CVS update: php31/main
| From: | zeev | Date: | Thu, 10 Sep 1998 23:17:09 +0000 |
| Subject: | CVS update: php31/main | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-943@lists.php.net to get a copy of this message | ||
Date: Thursday September 10, 1998 @ 19:17
Author: zeev
Update of /repository/php31/main
In directory asf:/u2/tmp/cvs-serv29661/main
Modified Files:
php.h variables.c variables.h
Log Message:
Get the 3.1 tree uptodate with those patches
Index: php31/main/php.h
diff -c php31/main/php.h:2.12 php31/main/php.h:2.13
*** php31/main/php.h:2.12 Sun Sep 6 17:34:37 1998
--- php31/main/php.h Thu Sep 10 19:17:07 1998
***************
*** 28,34 ****
+----------------------------------------------------------------------+
*/
! /* $Id: php.h,v 2.12 1998/09/06 21:34:37 zeev Exp $ */
#ifndef _PHP_H
#define _PHP_H
--- 28,34 ----
+----------------------------------------------------------------------+
*/
! /* $Id: php.h,v 2.13 1998/09/10 23:17:07 zeev Exp $ */
#ifndef _PHP_H
#define _PHP_H
***************
*** 236,242 ****
#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(php3_##name)
#define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types },
! #define PHP_FE(name, arg_types) PHP_NAMED_FE(#name, php3_##name, arg_types)
#define BEGIN_FUNCTION_ENTRIES(struct_name) function_entry struct_name[] = {
#define END_FUNCTION_ENTRIES() { NULL, NULL, NULL}, };
--- 236,242 ----
#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(php3_##name)
#define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types },
! #define PHP_FE(name, arg_types) PHP_NAMED_FE(name, php3_##name, arg_types)
#define BEGIN_FUNCTION_ENTRIES(struct_name) function_entry struct_name[] = {
#define END_FUNCTION_ENTRIES() { NULL, NULL, NULL}, };
Index: php31/main/variables.c
diff -c php31/main/variables.c:2.4 php31/main/variables.c:2.5
*** php31/main/variables.c:2.4 Mon Sep 7 01:33:24 1998
--- php31/main/variables.c Thu Sep 10 19:17:08 1998
***************
*** 29,35 ****
*/
! /* $Id: variables.c,v 2.4 1998/09/07 05:33:24 shane Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
--- 29,35 ----
*/
! /* $Id: variables.c,v 2.5 1998/09/10 23:17:08 zeev Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
***************
*** 70,79 ****
var->value.str.len = 0;
}
! PHPAPI void php3_yystype_destructor(pval *yystype){
! TLS_VARS;
! yystype_destructor(yystype _INLINE_TLS);
! }
inline void yystype_destructor(pval *yystype INLINE_TLS)
{
--- 70,76 ----
var->value.str.len = 0;
}
!
inline void yystype_destructor(pval *yystype INLINE_TLS)
{
***************
*** 95,100 ****
--- 92,106 ----
}
}
+
+ PHPAPI void php3tls_yystype_destructor(pval *yystype)
+ {
+ TLS_VARS;
+
+ yystype_destructor(yystype _INLINE_TLS);
+ }
+
+
/* returns 1 if the type of yystype is NOT IS_INTERNAL_FUNCTION */
inline int is_not_internal_function(pval *yystype)
{
***************
*** 143,148 ****
--- 149,160 ----
yystype->value.func.arg_types = emalloc(sizeof(unsigned char)*(arg_types[0]+1));
memcpy(yystype->value.func.arg_types, arg_types, sizeof(unsigned char)*(arg_types[0]+1));
}
+ if (yystype->type == IS_USER_FUNCTION && yystype->value.func.addr.statics) {
+ HashTable *statics = yystype->value.func.addr.statics;
+ pval tmp;
+
+ _php3_hash_copy(&yystype->value.func.addr.statics, statics, (void (*)(void *))
yystype_copy_constructor, &tmp, sizeof(pval));
+ }
}
return SUCCESS;
}
***************
*** 610,616 ****
yystype_copy_constructor(result);
if (implicit_ctor) {
if (call_user_function(NULL, result, classname, &ctor_retval, 0, NULL)==SUCCESS) {
! yystype_destructor(&ctor_retval _INLINE_TLS);
}
yystype_destructor(classname _INLINE_TLS);
}
--- 622,628 ----
yystype_copy_constructor(result);
if (implicit_ctor) {
if (call_user_function(NULL, result, classname, &ctor_retval, 0, NULL)==SUCCESS) {
! yystype_destructor(&ctor_retval _INLINE_TLS);
}
yystype_destructor(classname _INLINE_TLS);
}
***************
*** 624,631 ****
if (var) {
if (var_ptr->cs_data.array_write || (var->type==IS_STRING &&
var->value.str.val==undefined_variable_string)) {
! variable_tracker *vt;
!
if (stack_top(&GLOBAL(variable_unassign_stack),(void **) &vt)==SUCCESS) {
switch(vt->type) {
case IS_STRING:
--- 636,643 ----
if (var) {
if (var_ptr->cs_data.array_write || (var->type==IS_STRING &&
var->value.str.val==undefined_variable_string)) {
! variable_tracker *vt;
!
if (stack_top(&GLOBAL(variable_unassign_stack),(void **) &vt)==SUCCESS) {
switch(vt->type) {
case IS_STRING:
Index: php31/main/variables.h
diff -c php31/main/variables.h:2.2 php31/main/variables.h:2.3
*** php31/main/variables.h:2.2 Mon Sep 7 01:33:24 1998
--- php31/main/variables.h Thu Sep 10 19:17:09 1998
***************
*** 29,35 ****
*/
! /* $Id: variables.h,v 2.2 1998/09/07 05:33:24 shane Exp $ */
#ifndef _VARIABLES_H
--- 29,35 ----
*/
! /* $Id: variables.h,v 2.3 1998/09/10 23:17:09 zeev Exp $ */
#ifndef _VARIABLES_H
***************
*** 54,60 ****
extern void assign_new_object(pval *result, pval *classname, unsigned char implicit_ctor
INLINE_TLS);
! extern PHPAPI void php3_yystype_destructor(pval *yystype);
extern void yystype_destructor(pval *yystype INLINE_TLS);
extern PHPAPI int yystype_copy_constructor(pval *yystype);
#define pval_DESTRUCTOR (void (*)(void *)) yystype_destructor
--- 54,60 ----
extern void assign_new_object(pval *result, pval *classname, unsigned char implicit_ctor
INLINE_TLS);
! extern PHPAPI void php3tls_yystype_destructor(pval *yystype);
extern void yystype_destructor(pval *yystype INLINE_TLS);
extern PHPAPI int yystype_copy_constructor(pval *yystype);
#define pval_DESTRUCTOR (void (*)(void *)) yystype_destructor
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net