pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1329:    optflags OPT_TRY_OPTIMIZE|OPT_EXTERNAL_DEPEND;   {    if(ind->size != val->size)    bad_arg_error("mkmapping", Pike_sp-args, args, 2, "array", Pike_sp+1-args,    "mkmapping called on arrays of different sizes (%d != %d)\n",    ind->size, val->size);       RETURN mkmapping(ind, val);   }    - /*! @decl void secure(string str) + /*! @decl string secure(string str)    *! @belongs String    *!    *! Marks the string as secure, which will clear the memory area    *! before freeing the string.    */   PIKEFUN string string_secure(string str)    optflags OPT_SIDE_EFFECT;    rawtype tFunc(tSetvar(0, tStr), tVar(0));   {    str->flags |= STRING_CLEAR_ON_EXIT;    REF_RETURN str;   }    -  + /*! @decl object secure(object str) +  *! @belongs Object +  *! +  *! Marks the object as secure, which will clear the memory area +  *! before freeing the object. +  */ + PIKEFUN object object_secure(object obj) +  optflags OPT_SIDE_EFFECT; +  rawtype tFunc(tSetvar(0, tObj), tVar(0)); + { +  obj->flags |= OBJECT_CLEAR_ON_EXIT; +  REF_RETURN obj; + } +    /*! @decl int count(string haystack, string needle)    *! @belongs String    *!    *! Count the number of non-overlapping times the string @[needle]    *! occurs in the string @[haystack]. The special cases for the needle    *! @expr{""@} is that it occurs one time in the empty string, zero    *! times in a one character string and between every character    *! (length-1) in any other string.    *!    *! @seealso