mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
Removes unused code.
This commit is contained in:
21
types.c
21
types.c
@@ -15,27 +15,11 @@ Bucket *get_ht_bucket(HashTable *ht) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *__emalloc__(size_t size) { return emalloc(size); }
|
||||
|
||||
void __zend_hash_init__(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor,
|
||||
bool persistent) {
|
||||
zend_hash_init(ht, nSize, NULL, pDestructor, persistent);
|
||||
}
|
||||
|
||||
void __zval_null__(zval *zv) { ZVAL_NULL(zv); }
|
||||
|
||||
void __zval_bool__(zval *zv, bool val) { ZVAL_BOOL(zv, val); }
|
||||
|
||||
void __zval_long__(zval *zv, zend_long val) { ZVAL_LONG(zv, val); }
|
||||
|
||||
void __zval_double__(zval *zv, double val) { ZVAL_DOUBLE(zv, val); }
|
||||
|
||||
void __zval_string__(zval *zv, zend_string *str) { ZVAL_STR(zv, str); }
|
||||
|
||||
void __zval_empty_string__(zval *zv) { ZVAL_EMPTY_STRING(zv); }
|
||||
|
||||
void __zval_arr__(zval *zv, zend_array *arr) { ZVAL_ARR(zv, arr); }
|
||||
|
||||
zend_array *__zend_new_array__(uint32_t size) { return zend_new_array(size); }
|
||||
|
||||
bool is_internal_class(zend_class_entry *entry) {
|
||||
@@ -79,11 +63,6 @@ void __zval_unserialize__(zval *retval, zend_string *str) {
|
||||
zend_string_release(str);
|
||||
}
|
||||
|
||||
zval *__init_zval__() {
|
||||
zval *zv = (zval *)emalloc(sizeof(zval));
|
||||
return zv;
|
||||
}
|
||||
|
||||
zend_object *__php_object_init__(
|
||||
zval *zv,
|
||||
const char *class_name,
|
||||
|
||||
4
types.go
4
types.go
@@ -3,6 +3,10 @@ package frankenphp
|
||||
/*
|
||||
#cgo nocallback __zend_new_array__
|
||||
#cgo noescape __zend_new_array__
|
||||
#cgo nocallback zend_hash_str_update
|
||||
#cgo noescape zend_hash_str_update
|
||||
#cgo nocallback zend_hash_next_index_insert
|
||||
#cgo noescape zend_hash_next_index_insert
|
||||
#include "types.h"
|
||||
*/
|
||||
import "C"
|
||||
|
||||
9
types.h
9
types.h
@@ -10,23 +10,14 @@
|
||||
zval *get_ht_packed_data(HashTable *, uint32_t index);
|
||||
Bucket *get_ht_bucket(HashTable *);
|
||||
|
||||
void *__emalloc__(size_t size);
|
||||
void __zend_hash_init__(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor,
|
||||
bool persistent);
|
||||
|
||||
void __zval_null__(zval *zv);
|
||||
void __zval_bool__(zval *zv, bool val);
|
||||
void __zval_long__(zval *zv, zend_long val);
|
||||
void __zval_double__(zval *zv, double val);
|
||||
void __zval_string__(zval *zv, zend_string *str);
|
||||
void __zval_empty_string__(zval *zv);
|
||||
void __zval_arr__(zval *zv, zend_array *arr);
|
||||
zend_array *__zend_new_array__(uint32_t size);
|
||||
|
||||
bool is_internal_class(zend_class_entry *entry);
|
||||
zend_string *__zval_serialize__(zend_object *obj);
|
||||
void __zval_unserialize__(zval *retval, zend_string *str);
|
||||
zval *__init_zval__();
|
||||
zend_object *__php_object_init__(
|
||||
zval *zv,
|
||||
const char *class_name,
|
||||
|
||||
Reference in New Issue
Block a user