Changeset 15393
- Timestamp:
- 03/06/08 10:14:25 (9 months ago)
- Files:
-
- branches/branch-1-8/src/apis/php4/midgard.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/branch-1-8/src/apis/php4/midgard.c
r15390 r15393 1328 1328 PHP_FUNCTION(_midgard_php_object_list) 1329 1329 { 1330 #if (PHP_MAJOR_VERSION < 5)1331 1330 zend_class_entry *ce; 1332 #else1333 zend_class_entry **ce;1334 #endif1335 1331 RETVAL_FALSE; 1336 1332 CHECK_MGD; … … 1339 1335 WRONG_PARAM_COUNT; 1340 1336 1341 #if (PHP_MAJOR_VERSION < 5)1342 1337 ce = php_midgard_get_baseclass_ptr(Z_OBJCE_P(getThis())); 1343 #else 1344 *ce = php_midgard_get_baseclass_ptr(Z_OBJCE_P(getThis())); 1345 #endif 1338 1346 1339 array_init(return_value); 1347 1340 … … 1365 1358 g_type_name(G_TYPE_FROM_INSTANCE(objects[i])), -1); 1366 1359 #if (PHP_MAJOR_VERSION < 5) 1367 zend_class_entry * ce;1360 zend_class_entry *f_ce; 1368 1361 zend_hash_find(CG(class_table), 1369 1362 class_name, strlen(class_name)+1, (void **) &ce); 1370 object_init_ex(zobject, ce);1371 #else 1372 zend_class_entry ** ce;1363 object_init_ex(zobject, f_ce); 1364 #else 1365 zend_class_entry **f_ce; 1373 1366 zend_hash_find(CG(class_table), 1374 class_name, strlen(class_name)+1, (void **) & ce);1375 object_init_ex(zobject, * ce);1367 class_name, strlen(class_name)+1, (void **) &f_ce); 1368 object_init_ex(zobject, *f_ce); 1376 1369 #endif /* (PHP_MAJOR_VERSION < 5) */ 1377 1370 g_free(class_name); … … 1390 1383 PHP_FUNCTION(_midgard_php_object_list_children) 1391 1384 { 1392 #if (PHP_MAJOR_VERSION < 5)1393 1385 zend_class_entry *ce; 1394 #else1395 zend_class_entry **ce;1396 #endif1397 1386 gchar *childcname; 1398 1387 guint ccnl; … … 1405 1394 } 1406 1395 1407 #if (PHP_MAJOR_VERSION < 5)1408 1396 ce = php_midgard_get_baseclass_ptr(Z_OBJCE_P(getThis())); 1409 #else 1410 *ce = php_midgard_get_baseclass_ptr(Z_OBJCE_P(getThis())); 1411 #endif 1412 1397 1413 1398 array_init(return_value); 1414 1399 … … 1434 1419 g_type_name(G_TYPE_FROM_INSTANCE(objects[i])), -1); 1435 1420 #if (PHP_MAJOR_VERSION < 5) 1436 zend_class_entry * ce;1421 zend_class_entry *f_ce; 1437 1422 zend_hash_find(CG(class_table), 1438 1423 class_name, strlen(class_name)+1, (void **) &ce); 1439 1424 object_init_ex(zobject, ce); 1440 1425 #else 1441 zend_class_entry ** ce;1426 zend_class_entry **f_ce; 1442 1427 zend_hash_find(CG(class_table), 1443 class_name, strlen(class_name)+1, (void **) & ce);1444 object_init_ex(zobject, * ce);1428 class_name, strlen(class_name)+1, (void **) &f_ce); 1429 object_init_ex(zobject, *f_ce); 1445 1430 #endif /* (PHP_MAJOR_VERSION < 5) */ 1446 1431 g_free(class_name); … … 2804 2789 add_assoc_long(mgd_php_globals, "argc", mm_argc); 2805 2790 2806 for (i = 0; i < mm_argc; i++) 2807 add_index_string(argv, i, mm_argv[i], 1); 2791 for (i = 0; i < mm_argc; i++) { 2792 if(mm_argv[i] != NULL) 2793 add_index_string(argv, i, mm_argv[i], 1); 2794 else 2795 add_index_string(argv, i, "", 1); 2796 } 2808 2797 } 2809 2798
