cvs: /php3/functions php3_mcal.c
| From: | Mark Musone | Date: | Wed, 01 Sep 1999 21:25:04 +0000 |
| Subject: | cvs: /php3/functions php3_mcal.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10424@lists.php.net to get a copy of this message | ||
musone Wed Sep 1 17:25:04 1999 EDT
Modified files:
/php3/functions php3_mcal.c
Log:
removed more zend stuff
Index: php3/functions/php3_mcal.c
diff -u php3/functions/php3_mcal.c:1.2 php3/functions/php3_mcal.c:1.3
--- php3/functions/php3_mcal.c:1.2 Wed Sep 1 16:57:57 1999
+++ php3/functions/php3_mcal.c Wed Sep 1 17:25:04 1999
@@ -152,7 +152,7 @@
} else {
symtable = arg->value.ht;
}
- return zend_hash_update(symtable, key, strlen(key)+1, (void *) &tmp, sizeof(pval *),
NULL);
+ return _php3_hash_update(symtable, key, strlen(key)+1, (void *) &tmp, sizeof(pval *),
NULL);
}
@@ -347,7 +347,6 @@
object_init(return_value);
add_property_long(return_value,"id",myevent->id);
add_property_long(return_value,"public",myevent->public);
- MAKE_STD_ZVAL(start);
object_init(start);
if(myevent->start.has_date)
{
@@ -363,7 +362,6 @@
}
add_assoc_object(return_value, "start",start);
- MAKE_STD_ZVAL(end);
object_init(end);
if(myevent->end.has_date)
{
@@ -425,34 +423,32 @@
begincal.has_time=0;
endcal.has_time=0;
if(_php3_hash_find(begindate->value.ht,"year",sizeof("year"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
convert_to_long(*pvalue);
begincal.year=(*pvalue)->value.lval;
}
if(_php3_hash_find(begindate->value.ht,"month",sizeof("month"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
convert_to_long(*pvalue);
begincal.mon=(*pvalue)->value.lval;
}
if(_php3_hash_find(begindate->value.ht,"day",sizeof("day"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
begincal.mday=(*pvalue)->value.lval;
}
if(myargc == 3)
{
if(_php3_hash_find(enddate->value.ht,"year",sizeof("year"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
endcal.year=(*pvalue)->value.lval;
}
if(_php3_hash_find(enddate->value.ht,"month",sizeof("month"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
endcal.mon=(*pvalue)->value.lval;
}
if(_php3_hash_find(enddate->value.ht,"day",sizeof("day"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
endcal.mday=(*pvalue)->value.lval;
}
@@ -576,28 +572,28 @@
mydate.has_date=1;
mydate.has_time=1;
if(_php3_hash_find(date->value.ht,"year",sizeof("year"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
mydate.year=(*pvalue)->value.lval;
}
if(_php3_hash_find(date->value.ht,"month",sizeof("month"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
mydate.mon=(*pvalue)->value.lval;
}
if(_php3_hash_find(date->value.ht,"day",sizeof("day"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
mydate.mday=(*pvalue)->value.lval;
}
if(_php3_hash_find(time->value.ht,"hour",sizeof("hour"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
mydate.hour=(*pvalue)->value.lval;
}
if(_php3_hash_find(time->value.ht,"minute",sizeof("minute"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
mydate.min=(*pvalue)->value.lval;
}
@@ -735,69 +731,69 @@
}
myevent=calevent_new();
if(_php3_hash_find(storeobject->value.ht,"uid",sizeof("uid"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->id=(*pvalue)->value.lval;
}
if(_php3_hash_find(storeobject->value.ht,"public",sizeof("public"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->public=(*pvalue)->value.lval;
}
if(_php3_hash_find(storeobject->value.ht,"category",sizeof("category"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_string(*pvalue);
myevent->category=strdup((*pvalue)->value.str.val);
}
if(_php3_hash_find(storeobject->value.ht,"title",sizeof("title"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_string(*pvalue);
myevent->title=strdup((*pvalue)->value.str.val);
}
if(_php3_hash_find(storeobject->value.ht,"description",sizeof("description"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_string(*pvalue);
myevent->description=strdup((*pvalue)->value.str.val);
}
if(_php3_hash_find(storeobject->value.ht,"alarm",sizeof("alarm"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->alarm=(*pvalue)->value.lval;
}
if(_php3_hash_find(storeobject->value.ht,"start",sizeof("start"),(void **)
&temppvalue)== SUCCESS){
- SEPARATE_ZVAL(temppvalue);
+
convert_to_array(*temppvalue);
if(_php3_hash_find((*temppvalue)->value.ht,"year",sizeof("year"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->start.year=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"month",sizeof("month"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->start.mon=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"mday",sizeof("mday"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->start.mday=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"hour",sizeof("hour"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->start.hour=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"min",sizeof("min"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->start.min=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"sec",sizeof("sec"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->start.sec=(*pvalue)->value.lval;
}
@@ -805,36 +801,36 @@
}
if(_php3_hash_find(storeobject->value.ht,"end",sizeof("end"),(void
**) &temppvalue)== SUCCESS){
- SEPARATE_ZVAL(temppvalue);
+
convert_to_array(*temppvalue);
if(_php3_hash_find((*temppvalue)->value.ht,"year",sizeof("year"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->end.year=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"month",sizeof("month"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->end.mon=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"mday",sizeof("mday"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->end.mday=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"hour",sizeof("hour"),(void
**) &pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->end.hour=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"min",sizeof("min"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->end.min=(*pvalue)->value.lval;
}
if(_php3_hash_find((*temppvalue)->value.ht,"sec",sizeof("sec"),(void **)
&pvalue)== SUCCESS){
- SEPARATE_ZVAL(pvalue);
+
convert_to_long(*pvalue);
myevent->end.sec=(*pvalue)->value.lval;
}