Radamsa

 view release on metacpan or  search on metacpan

radamsa/c/libradamsa.c  view on Meta::CPAN

         }
         return INULL;
      case 39: /* chmod fd|path mode follow → bool */
         if ((immediatep(a) || stringp(a)) && fixnump(b)) {
            mode_t mod = immval(b);
            int flg = c != IFALSE ? 0 : AT_SYMLINK_NOFOLLOW;
            if ((allocp(a) ? fchmodat(AT_FDCWD, (char *)a + W, mod, flg) : fchmod(immval(a), mod)) == 0)
               return ITRUE;
         }
         return IFALSE;
      case 40: /* chown fd|path (uid . gid) follow → bool */
         if ((immediatep(a) || stringp(a)) && pairp(b)) {
            uid_t uid = cnum(G(b, 1));
            gid_t gid = cnum(G(b, 2));
            int flg = c != IFALSE ? 0 : AT_SYMLINK_NOFOLLOW;
            if ((allocp(a) ? fchownat(AT_FDCWD, (char *)a + W, uid, gid, flg) : fchown(immval(a), uid, gid)) == 0)
               return ITRUE;
         }
         return IFALSE;
      case 41: { /* peek mem nbytes → num */
         const word p = cnum(a);
         return onum(
            b == F(1) ? *(uint8_t *)p :
            b == F(2) ? *(uint16_t *)p :
            b == F(4) ? *(uint32_t *)p :
            b == F(8) ? *(uint64_t *)p :



( run in 1.907 second using v1.01-cache-2.11-cpan-5511b514fd6 )