这篇教程C++ zend_string_release函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中zend_string_release函数的典型用法代码示例。如果您正苦于以下问题:C++ zend_string_release函数的具体用法?C++ zend_string_release怎么用?C++ zend_string_release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了zend_string_release函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: zend_print_zval_r_exZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent) /* {{{ */{ ZVAL_DEREF(expr); switch (Z_TYPE_P(expr)) { case IS_ARRAY: ZEND_PUTS_EX("Array/n"); if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr)) && ++Z_ARRVAL_P(expr)->u.v.nApplyCount>1) { ZEND_PUTS_EX(" *RECURSION*"); Z_ARRVAL_P(expr)->u.v.nApplyCount--; return; } print_hash(write_func, Z_ARRVAL_P(expr), indent, 0); if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr))) { Z_ARRVAL_P(expr)->u.v.nApplyCount--; } break; case IS_OBJECT: { HashTable *properties; int is_temp; zend_string *class_name = Z_OBJ_HANDLER_P(expr, get_class_name)(Z_OBJ_P(expr)); ZEND_PUTS_EX(ZSTR_VAL(class_name)); zend_string_release(class_name); ZEND_PUTS_EX(" Object/n"); if (Z_OBJ_APPLY_COUNT_P(expr) > 0) { ZEND_PUTS_EX(" *RECURSION*"); return; } if ((properties = Z_OBJDEBUG_P(expr, is_temp)) == NULL) { break; } Z_OBJ_INC_APPLY_COUNT_P(expr); print_hash(write_func, properties, indent, 1); Z_OBJ_DEC_APPLY_COUNT_P(expr); if (is_temp) { zend_hash_destroy(properties); FREE_HASHTABLE(properties); } break; } default: zend_print_zval_ex(write_func, expr, indent); break; }}
开发者ID:MarkBaker,项目名称:php-src,代码行数:50,
示例2: phpdbg_switch_framevoid phpdbg_switch_frame(int frame) /* {{{ */{ zend_execute_data *execute_data = PHPDBG_FRAME(num) ? PHPDBG_FRAME(execute_data) : EG(current_execute_data); int i = 0; if (PHPDBG_FRAME(num) == frame) { phpdbg_notice("frame", "id=/"%d/"", "Already in frame #%d", frame); return; } phpdbg_try_access { while (execute_data) { if (i++ == frame) { break; } do { execute_data = execute_data->prev_execute_data; } while (execute_data && execute_data->opline == NULL); } } phpdbg_catch_access { phpdbg_error("signalsegv", "", "Couldn't switch frames, invalid data source"); return; } phpdbg_end_try_access(); if (execute_data == NULL) { phpdbg_error("frame", "type=/"maxnum/" id=/"%d/"", "No frame #%d", frame); return; } phpdbg_restore_frame(); if (frame > 0) { PHPDBG_FRAME(num) = frame; /* backup things and jump back */ PHPDBG_FRAME(execute_data) = EG(current_execute_data); EG(current_execute_data) = execute_data; } phpdbg_try_access { zend_string *s = phpdbg_compile_stackframe(EG(current_execute_data)); phpdbg_notice("frame", "id=/"%d/" frameinfo=/"%.*s/"", "Switched to frame #%d: %.*s", frame, (int) ZSTR_LEN(s), ZSTR_VAL(s)); zend_string_release(s); } phpdbg_catch_access { phpdbg_notice("frame", "id=/"%d/"", "Switched to frame #%d", frame); } phpdbg_end_try_access(); phpdbg_print_cur_frame_info();} /* }}} */
开发者ID:AllenJB,项目名称:php-src,代码行数:50,
示例3: free_zend_constantvoid free_zend_constant(zval *zv){ zend_constant *c = Z_PTR_P(zv); if (!(c->flags & CONST_PERSISTENT)) { zval_dtor(&c->value); } else { zval_internal_dtor(&c->value); } if (c->name) { zend_string_release(c->name); } pefree(c, c->flags & CONST_PERSISTENT);}
开发者ID:0xhacking,项目名称:php-src,代码行数:14,
示例4: zend_string_initPHP_MAILPARSE_API char *php_mimepart_attribute_get(struct php_mimeheader_with_attributes *attr, char *attrname){ zval *attrval; zend_string *hash_key; hash_key = zend_string_init(attrname, strlen(attrname), 0); attrval = zend_hash_find(Z_ARRVAL_P(&attr->attributes), hash_key); zend_string_release(hash_key); if (attrval != NULL) { return Z_STRVAL_P(attrval); } return NULL;}
开发者ID:php,项目名称:pecl-mail-mailparse,代码行数:14,
示例5: PHP_METHOD/* {{{ proto SolrDocumentField SolrInputDocument::getField(string fieldname) Returns the requested field. */PHP_METHOD(SolrInputDocument, getField){ solr_char_t *field_name = NULL; COMPAT_ARG_SIZE_T field_name_length = 0; solr_document_t *doc_entry = NULL; zend_string *field_str = NULL; /* Process the parameters passed to the default constructor */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &field_name, &field_name_length) == FAILURE) { RETURN_FALSE; } if (!field_name_length) { RETURN_FALSE; } field_str = zend_string_init(field_name, field_name_length, SOLR_DOCUMENT_FIELD_PERSISTENT); /* Retrieve the document entry for the SolrDocument instance */ if (solr_fetch_document_entry(getThis(), &doc_entry TSRMLS_CC) == SUCCESS) { solr_field_list_t *field_values = NULL; if ((field_values = zend_hash_find_ptr(doc_entry->fields, field_str)) != NULL) { solr_create_document_field_object(field_values, &return_value TSRMLS_CC); /* The field was retrieved, so we're done here */ zend_string_release(field_str); return ; } goto return_false; }return_false: zend_string_release(field_str); RETURN_FALSE;}
开发者ID:cfgxy,项目名称:php-solr,代码行数:39,
示例6: _php_array_to_envp/* {{{ _php_array_to_envp */static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent){ zval *element; php_process_env_t env; zend_string *key, *str;#ifndef PHP_WIN32 char **ep;#endif char *p; size_t cnt, l, sizeenv = 0; HashTable *env_hash; memset(&env, 0, sizeof(env)); if (!environment) { return env; } cnt = zend_hash_num_elements(Z_ARRVAL_P(environment)); if (cnt < 1) {#ifndef PHP_WIN32 env.envarray = (char **) pecalloc(1, sizeof(char *), is_persistent);#endif env.envp = (char *) pecalloc(4, 1, is_persistent); return env; } ALLOC_HASHTABLE(env_hash); zend_hash_init(env_hash, cnt, NULL, NULL, 0); /* first, we have to get the size of all the elements in the hash */ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(environment), key, element) { str = zval_get_string(element); if (ZSTR_LEN(str) == 0) { zend_string_release(str); continue; } sizeenv += ZSTR_LEN(str) + 1; if (key && ZSTR_LEN(key)) { sizeenv += ZSTR_LEN(key) + 1; zend_hash_add_ptr(env_hash, key, str); } else { zend_hash_next_index_insert_ptr(env_hash, str); } } ZEND_HASH_FOREACH_END();
开发者ID:AxiosCros,项目名称:php-src,代码行数:50,
示例7: zend_print_flat_zval_rZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */{ switch (Z_TYPE_P(expr)) { case IS_ARRAY: ZEND_PUTS("Array ("); if (Z_REFCOUNTED_P(expr)) { if (Z_IS_RECURSIVE_P(expr)) { ZEND_PUTS(" *RECURSION*"); return; } Z_PROTECT_RECURSION_P(expr); } print_flat_hash(Z_ARRVAL_P(expr)); ZEND_PUTS(")"); if (Z_REFCOUNTED_P(expr)) { Z_UNPROTECT_RECURSION_P(expr); } break; case IS_OBJECT: { HashTable *properties = NULL; zend_string *class_name = Z_OBJ_HANDLER_P(expr, get_class_name)(Z_OBJ_P(expr)); zend_printf("%s Object (", ZSTR_VAL(class_name)); zend_string_release(class_name); if (Z_IS_RECURSIVE_P(expr)) { ZEND_PUTS(" *RECURSION*"); return; } if (Z_OBJ_HANDLER_P(expr, get_properties)) { properties = Z_OBJPROP_P(expr); } if (properties) { Z_PROTECT_RECURSION_P(expr); print_flat_hash(properties); Z_UNPROTECT_RECURSION_P(expr); } ZEND_PUTS(")"); break; } case IS_REFERENCE: zend_print_flat_zval_r(Z_REFVAL_P(expr)); break; default: zend_print_variable(expr); break; }}
开发者ID:eaglewu,项目名称:php-src,代码行数:49,
示例8: GenerateCryptographicallySecureRandomBytes// Creates a buffer of |length| cryptographically secure random bytes. An error// will be thrown if the bytes could not be generated, for example because the// PRNG doesn't have enough entropy. Ownership of the created string is passed.static zend_string* GenerateCryptographicallySecureRandomBytes(size_t length) { zend_string* buffer = zend_string_alloc(length, 0); if (!buffer) { php_error_docref(NULL, E_ERROR, kRandomBytesAllocationError); return NULL; } if (RAND_bytes(buffer->val, length) != 1) { php_error_docref(NULL, E_ERROR, kRandomBytesEntropyError); zend_string_release(buffer); return NULL; } return buffer;}
开发者ID:beverloo,项目名称:php-ece,代码行数:18,
示例9: check_http_hoststatic int check_http_host(char *target){ zval *host, *tmp; zend_string *host_tmp; char *colon; if ((tmp = zend_hash_str_find(&EG(symbol_table), ZEND_STRL("_SERVER"))) && (host = zend_hash_str_find(Z_ARRVAL_P(tmp), ZEND_STRL("HTTP_HOST"))) && Z_TYPE_P(host) == IS_STRING) { host_tmp = zend_string_init(Z_STRVAL_P(host), Z_STRLEN_P(host), 0); /* HTTP_HOST could be 'localhost:8888' etc. */ colon = strchr(ZSTR_VAL(host_tmp), ':'); if (colon) { ZSTR_LEN(host_tmp) = colon - ZSTR_VAL(host_tmp); ZSTR_VAL(host_tmp)[ZSTR_LEN(host_tmp)] = '/0'; } if (!strcasecmp(ZSTR_VAL(host_tmp), target)) { zend_string_release(host_tmp); return SUCCESS; } zend_string_release(host_tmp); } return FAILURE;}
开发者ID:LTD-Beget,项目名称:php-src,代码行数:24,
示例10: CLASS_METHOD/** public function ION/HTTP/Message::withProtocolVersion(string $version) : self */CLASS_METHOD(ION_HTTP_Message, withProtocolVersion) { ion_http_message * message = ION_THIS_OBJECT(ion_http_message); zend_string * version = NULL; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(version) ZEND_PARSE_PARAMETERS_END_EX(PION_ZPP_THROW); if(message->version) { zend_string_release(message->version); } message->version = zend_string_copy(version); RETURN_THIS();}
开发者ID:dreamsxin,项目名称:php-ion,代码行数:16,
示例11: yac_add_multi_implstatic int yac_add_multi_impl(zend_string *prefix, zval *kvs, int ttl, int add) /* {{{ */ { HashTable *ht = Z_ARRVAL_P(kvs); zend_string *key; zend_ulong idx; zval *value; ZEND_HASH_FOREACH_KEY_VAL(ht, idx, key, value) { uint32_t should_free = 0; if (!key) { key = strpprintf(0, "%lu", idx); should_free = 1; } if (yac_add_impl(prefix, key, value, ttl, add)) { if (should_free) { zend_string_release(key); } continue; } else { if (should_free) { zend_string_release(key); } return 0; } } ZEND_HASH_FOREACH_END();
开发者ID:Neeke,项目名称:yac,代码行数:24,
示例12: zend_print_flat_zval_rZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */{ switch (Z_TYPE_P(expr)) { case IS_ARRAY: ZEND_PUTS("Array ("); if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr)) && ++Z_ARRVAL_P(expr)->u.v.nApplyCount>1) { ZEND_PUTS(" *RECURSION*"); Z_ARRVAL_P(expr)->u.v.nApplyCount--; return; } print_flat_hash(Z_ARRVAL_P(expr)); ZEND_PUTS(")"); if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr))) { Z_ARRVAL_P(expr)->u.v.nApplyCount--; } break; case IS_OBJECT: { HashTable *properties = NULL; zend_string *class_name = Z_OBJ_HANDLER_P(expr, get_class_name)(Z_OBJ_P(expr)); zend_printf("%s Object (", ZSTR_VAL(class_name)); zend_string_release(class_name); if (Z_OBJ_APPLY_COUNT_P(expr) > 0) { ZEND_PUTS(" *RECURSION*"); return; } if (Z_OBJ_HANDLER_P(expr, get_properties)) { properties = Z_OBJPROP_P(expr); } if (properties) { Z_OBJ_INC_APPLY_COUNT_P(expr); print_flat_hash(properties); Z_OBJ_DEC_APPLY_COUNT_P(expr); } ZEND_PUTS(")"); break; } case IS_REFERENCE: zend_print_flat_zval_r(Z_REFVAL_P(expr)); break; default: zend_print_variable(expr); break; }}
开发者ID:woyager,项目名称:vgtrk_br,代码行数:48,
示例13: PHP_FUNCTION/* {{{ proto mixed hstore_encode(array hstore) Decodes the hStore representation into a PHP value */static PHP_FUNCTION(hstore_encode){ zval *array, *value; zend_ulong num_idx; zend_string *str_idx; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &array) == FAILURE) { return; } smart_str buf = {}; smart_str_alloc(&buf, 2048, 0); zend_bool need_comma = 0; ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_idx, str_idx, value) { if (need_comma) { smart_str_appendl(&buf, ", ", 2); } else { need_comma = 1; } smart_str_appendc(&buf, '"'); if (str_idx) { escape_string(&buf, str_idx); } else { smart_str_append_long(&buf, (long) num_idx); } smart_str_appendl(&buf, "/"=>", 3); if (Z_TYPE_P(value) == IS_NULL) { smart_str_appendl(&buf, "NULL", 4); } else { convert_to_string_ex(value); smart_str_appendc(&buf, '"'); zend_string *str = zval_get_string(value); escape_string(&buf, str); zend_string_release(str); smart_str_appendc(&buf, '"'); } } ZEND_HASH_FOREACH_END(); smart_str_0(&buf); /* copy? */ ZVAL_NEW_STR(return_value, buf.s);}
开发者ID:intaro,项目名称:hstore-extension,代码行数:50,
示例14: autoload_func_info_dtorstatic void autoload_func_info_dtor(zval *element){ autoload_func_info *alfi = (autoload_func_info*)Z_PTR_P(element); if (!Z_ISUNDEF(alfi->obj)) { zval_ptr_dtor(&alfi->obj); } if (alfi->func_ptr && UNEXPECTED(alfi->func_ptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { zend_string_release(alfi->func_ptr->common.function_name); zend_free_trampoline(alfi->func_ptr); } if (!Z_ISUNDEF(alfi->closure)) { zval_ptr_dtor(&alfi->closure); } efree(alfi);}
开发者ID:AllenJB,项目名称:php-src,代码行数:16,
示例15: ZEND_METHODZEND_METHOD(Closure, __invoke) /* {{{ */{ zend_function *func = EX(func); zval *arguments = ZEND_CALL_ARG(execute_data, 1); if (call_user_function_ex(CG(function_table), NULL, getThis(), return_value, ZEND_NUM_ARGS(), arguments, 1, NULL) == FAILURE) { RETVAL_FALSE; } /* destruct the function also, then - we have allocated it in get_method */ zend_string_release(func->internal_function.function_name); efree(func);#if ZEND_DEBUG execute_data->func = NULL;#endif}
开发者ID:druid628,项目名称:php-src,代码行数:16,
示例16: php_mysqlnd_free_field_metadata/* {{{ php_mysqlnd_free_field_metadata */static voidphp_mysqlnd_free_field_metadata(MYSQLND_FIELD *meta, zend_bool persistent){ if (meta) { if (meta->root) { mnd_pefree(meta->root, persistent); meta->root = NULL; } if (meta->def) { mnd_pefree(meta->def, persistent); meta->def = NULL; } if (meta->sname) { zend_string_release(meta->sname); } }}
开发者ID:13572293130,项目名称:php-src,代码行数:18,
示例17: zend_string_hash_valstatic zend_string *zend_new_interned_string_permanent(zend_string *str){ zend_string *ret; if (ZSTR_IS_INTERNED(str)) { return str; } zend_string_hash_val(str); ret = zend_interned_string_ht_lookup(str, &interned_strings_permanent); if (ret) { zend_string_release(str); return ret; } return zend_add_interned_string(str, &interned_strings_permanent, IS_STR_PERMANENT);}
开发者ID:eaglewu,项目名称:php-src,代码行数:17,
示例18: dom_characterdata_data_writeint dom_characterdata_data_write(dom_object *obj, zval *newval){ xmlNode *nodep = dom_object_get_node(obj); zend_string *str; if (nodep == NULL) { php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } str = zval_get_string(newval); xmlNodeSetContentLen(nodep, (xmlChar *) str->val, str->len + 1); zend_string_release(str); return SUCCESS;}
开发者ID:0xhacking,项目名称:php-src,代码行数:17,
示例19: createObject// Create a PHP object given a typename and call the ctor, optionally passing up to 2 argumentsstaticvoid createObject(const char* obj_typename, zval* return_value, int nargs = 0, zval* arg1 = nullptr, zval* arg2 = nullptr) { /* is there a better way to do that on the stack ? */ zend_string *obj_name = zend_string_init(obj_typename, strlen(obj_typename), 0); zend_class_entry* ce = zend_fetch_class(obj_name, ZEND_FETCH_CLASS_DEFAULT); zend_string_release(obj_name); if (! ce) { php_error_docref(nullptr, E_ERROR, "Class %s does not exist", obj_typename); RETURN_NULL(); } object_and_properties_init(return_value, ce, nullptr); zend_function* constructor = zend_std_get_constructor(Z_OBJ_P(return_value)); zval ctor_rv; zend_call_method(return_value, ce, &constructor, NULL, 0, &ctor_rv, nargs, arg1, arg2); zval_dtor(&ctor_rv);}
开发者ID:apupier,项目名称:fn,代码行数:19,
示例20: from_zval_write_sin6_addrstatic void from_zval_write_sin6_addr(const zval *zaddr_str, char *addr6, ser_context *ctx){ int res; struct sockaddr_in6 saddr6 = {0}; zend_string *addr_str; addr_str = zval_get_string((zval *) zaddr_str); res = php_set_inet6_addr(&saddr6, addr_str->val, ctx->sock); if (res) { memcpy(addr6, &saddr6.sin6_addr, sizeof saddr6.sin6_addr); } else { /* error already emitted, but let's emit another more relevant */ do_from_zval_err(ctx, "could not resolve address '%s' to get an AF_INET6 " "address", Z_STRVAL_P(zaddr_str)); } zend_string_release(addr_str);}
开发者ID:AmesianX,项目名称:php-src,代码行数:18,
示例21: PHP_METHOD/* {{{ bool SQLite::sqliteCreateCollation(string name, mixed callback) Registers a collation with the sqlite db handle */static PHP_METHOD(SQLite, sqliteCreateCollation){ struct pdo_sqlite_collation *collation; zval *callback; char *collation_name; size_t collation_name_len; pdo_dbh_t *dbh; pdo_sqlite_db_handle *H; int ret; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STRING(collation_name, collation_name_len) Z_PARAM_ZVAL(callback) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); dbh = Z_PDO_DBH_P(getThis()); PDO_CONSTRUCT_CHECK; if (!zend_is_callable(callback, 0, NULL)) { zend_string *cbname = zend_get_callable_name(callback); php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(cbname)); zend_string_release(cbname); RETURN_FALSE; } H = (pdo_sqlite_db_handle *)dbh->driver_data; collation = (struct pdo_sqlite_collation*)ecalloc(1, sizeof(*collation)); ret = sqlite3_create_collation(H->db, collation_name, SQLITE_UTF8, collation, php_sqlite3_collation_callback); if (ret == SQLITE_OK) { collation->name = estrdup(collation_name); ZVAL_COPY(&collation->callback, callback); collation->next = H->collations; H->collations = collation; RETURN_TRUE; } efree(collation); RETURN_FALSE;}
开发者ID:AxiosCros,项目名称:php-src,代码行数:46,
示例22: pcre_match/* * get php_do_pcre_match */int pcre_match (char * regex, char * subject) // {{{{ /* parameters */ pcre_cache_entry * pce; /* Compiled regular expression */ zend_string * regex_string; /* Regular expression */ zval * subpats = NULL; /* Array for subpatterns */ zval * matches; /* match counter */ zend_long start_offset = 0; /* Where the new search starts */ int return_val = -1; regex_string = ze_string_init (regex, STRLEN (regex), 0);#if PHP_VERSION_ID < 70300 if ( ZEND_SIZE_T_INT_OVFL (STRLEN (subject))) { php_error_docref (NULL, E_WARNING, "Subject is too long"); return -1; }#endif /* Compile regex or get it from cache. */ if ( (pce = pcre_get_compiled_regex_cache (regex_string) ) == NULL) { return -1; } zend_string_release (regex_string); matches = safe_emalloc (pce->capture_count + 1, sizeof (zval), 0); pce->refcount++; php_pcre_match_impl ( pce, subject, STRLEN (subject), matches, subpats, 0, 0, 0, start_offset ); pce->refcount--; if ( Z_TYPE_P (matches) != IS_LONG ) { kr_safe_efree (matches); return -1; } return_val = (int) Z_LVAL_P (matches); kr_safe_efree (matches); return return_val;} // }}}
开发者ID:OOPS-ORG-PHP,项目名称:mod_korean,代码行数:46,
示例23: free_persistent_scriptvoid free_persistent_script(zend_persistent_script *persistent_script, int destroy_elements){ if (destroy_elements) { persistent_script->function_table.pDestructor = zend_accel_destroy_zend_function; persistent_script->class_table.pDestructor = zend_accel_destroy_zend_class; } else { persistent_script->function_table.pDestructor = NULL; persistent_script->class_table.pDestructor = NULL; } zend_hash_destroy(&persistent_script->function_table); zend_hash_destroy(&persistent_script->class_table); if (persistent_script->full_path) { zend_string_release(persistent_script->full_path); } efree(persistent_script);}
开发者ID:NickeyWoo,项目名称:php,代码行数:19,
示例24: php_ds_pair_serializeint php_ds_pair_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_data *data){ smart_str buf = {0}; ds_pair_t *pair = Z_DS_PAIR_P(object); php_serialize_data_t serialize_data = (php_serialize_data_t) data; PHP_VAR_SERIALIZE_INIT(serialize_data); php_var_serialize(&buf, &pair->key, &serialize_data); php_var_serialize(&buf, &pair->value, &serialize_data); smart_str_0(&buf); SERIALIZE_SET_ZSTR(buf.s); zend_string_release(buf.s); PHP_VAR_SERIALIZE_DESTROY(serialize_data); return SUCCESS;}
开发者ID:dlundgren,项目名称:extension,代码行数:19,
示例25: ZEND_METHODZEND_METHOD(Closure, __invoke) /* {{{ */{ zend_function *func = EX(func); zval *arguments; arguments = emalloc(sizeof(zval) * ZEND_NUM_ARGS()); if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), arguments) == FAILURE) { efree(arguments); zend_error(E_RECOVERABLE_ERROR, "Cannot get arguments for calling closure"); RETVAL_FALSE; } else if (call_user_function_ex(CG(function_table), NULL, getThis(), return_value, ZEND_NUM_ARGS(), arguments, 1, NULL) == FAILURE) { RETVAL_FALSE; } efree(arguments); /* destruct the function also, then - we have allocated it in get_method */ zend_string_release(func->internal_function.function_name); efree(func);}
开发者ID:ahamid,项目名称:php-src,代码行数:19,
示例26: alter_inistatic int alter_ini( const char * pKey, int keyLen, const char * pValue, int valLen, void * arg ){#if PHP_MAJOR_VERSION >= 7 zend_string * psKey;#endif int type = ZEND_INI_PERDIR; int stage = PHP_INI_STAGE_RUNTIME; if ( '/001' == *pKey ) { ++pKey; if ( *pKey == 4 ) { type = ZEND_INI_SYSTEM; } else { stage = PHP_INI_STAGE_HTACCESS; } ++pKey; --keyLen; if (( keyLen == 7 )&&( strncasecmp( pKey, "engine", 6 )== 0 )) { if ( *pValue == '0' ) engine = 0; } else {#if PHP_MAJOR_VERSION >= 7 --keyLen; psKey = zend_string_init(pKey, keyLen, 1); zend_alter_ini_entry_chars(psKey, (char *)pValue, valLen, type, stage); zend_string_release(psKey);#else zend_alter_ini_entry((char *)pKey, keyLen, (char *)pValue, valLen, type, stage);#endif } } return 1;}
开发者ID:RyanNerd,项目名称:php-src,代码行数:42,
示例27: php_url_free/* {{{ free_url */PHPAPI void php_url_free(php_url *theurl){ if (theurl->scheme) zend_string_release(theurl->scheme); if (theurl->user) zend_string_release(theurl->user); if (theurl->pass) zend_string_release(theurl->pass); if (theurl->host) zend_string_release(theurl->host); if (theurl->path) zend_string_release(theurl->path); if (theurl->query) zend_string_release(theurl->query); if (theurl->fragment) zend_string_release(theurl->fragment); efree(theurl);}
开发者ID:AllenJB,项目名称:php-src,代码行数:20,
注:本文中的zend_string_release函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ zend_strtod函数代码示例 C++ zend_string_init函数代码示例 |