]> granicus.if.org Git - php/commitdiff
* Include all of the standard modules in internal_functions.c.in. Stig - is that
authorZeev Suraski <zeev@php.net>
Fri, 14 May 1999 18:25:16 +0000 (18:25 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 14 May 1999 18:25:16 +0000 (18:25 +0000)
  the way you intended it to be?  How does the basic_functions module get in there?
* Fix to get MySQL objects working, even though I'll probably make a dedicated
  MySQL object in the future.

14 files changed:
ext/mysql/mysql.c
ext/standard/basic_functions.c
ext/standard/dl.h
ext/standard/file.h
ext/standard/fsock.h
ext/standard/head.h
ext/standard/pack.h
ext/standard/php3_browscap.h
ext/standard/php3_crypt.h
ext/standard/php3_dir.h
ext/standard/php3_filestat.h
ext/standard/php3_mail.h
ext/standard/php3_syslog.h
main/internal_functions.c.in

index afe05d3b7e7249051201971b4e6690d3b5b2f9b5..06b1306793a82070f269132c1b349fad0eee0304 100644 (file)
@@ -1481,6 +1481,8 @@ void php3_mysql_fetch_object(INTERNAL_FUNCTION_PARAMETERS)
        php3_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        if (return_value->type==IS_ARRAY) {
                return_value->type=IS_OBJECT;
+               return_value->value.obj.properties = return_value->value.ht;
+               return_value->value.obj.ce = &standard_class;
        }
 }
 /* }}} */
index b908e96a416838cea858480e52a8d39d33a2181b..ed3ac070419070d9a33f20228da14243f6f1ae68 100644 (file)
@@ -122,7 +122,6 @@ function_entry basic_functions[] = {
        {"rtrim",               php3_chop,                                      NULL},
        {"pos",                 array_current,                          first_arg_force_ref},
 
-       {"fsockopen",                   php3_fsockopen,         third_and_fourth_args_force_ref},
        {"getimagesize",                php3_getimagesize,      NULL},
        {"htmlspecialchars",    php3_htmlspecialchars,  NULL},
        {"htmlentities",                php3_htmlentities,      NULL},
index 87a684e5837e19c2a873039e8bd237e42cf3f2bb..a6e134e6917df0e1efe80d985f58a314b60d2541 100644 (file)
@@ -56,5 +56,6 @@ extern void php3_info_dl(ZEND_MODULE_INFO_FUNC_ARGS);
 
 #endif
 
+#define phpext_dl_ptr dl_module_ptr
 
 #endif /* _DL_H */
index 1274d4dcd765e1733c19547c4a494d1ff6233138..fd4b634622eea64c24c7fb7043245765f31d9465 100644 (file)
@@ -64,4 +64,5 @@ extern void php3_set_socket_timeout(INTERNAL_FUNCTION_PARAMETERS);
 extern void php3_get_meta_tags(INTERNAL_FUNCTION_PARAMETERS);
 extern PHP_FUNCTION(flock);
 
+#define phpext_file_ptr php3_file_module_ptr
 #endif /* _FILE_H */
index f58da7fdeb840b7ddc519b6254ce39a0f183a913..2d723daae1aa5fb71bd5f026a8eb1c787dfb6d74 100644 (file)
@@ -54,4 +54,6 @@ extern int _php3_sock_fgets(char *buf, int maxlen, int socket);
 extern int _php3_sock_fread(char *buf, int maxlen, int socket);
 extern int _php3_is_persistent_sock(int);
 
+#define phpext_fsock_ptr fsock_module_ptr
+
 #endif /* _FSOCK_H */
index 37db395e2cc899706d7b3f7594a789b78c622cc3..b054b135b8ec9885e036f4b3c28b568fbd87ce62 100644 (file)
@@ -61,4 +61,6 @@ void php4i_add_header_information(char *header_information, uint header_length);
 PHPAPI int php3_header(void);
 int php3_headers_unsent(void);
 
+#define phpext_head_ptr php3_header_module_ptr
+
 #endif
index 36a55091a37196ebb6a8681370c57666398cb8b9..6cc65f3a35219d405b819dffd243e14a1617b7fa 100644 (file)
@@ -39,4 +39,6 @@ extern int php3_minit_pack(INIT_FUNC_ARGS);
 extern void php3_pack(INTERNAL_FUNCTION_PARAMETERS);
 extern void php3_unpack(INTERNAL_FUNCTION_PARAMETERS);
 
+#define phpext_pack_ptr pack_module_ptr
+
 #endif /* _PACK_H */
index 0b5e8cafd474847d74cba17e16bb6a6b0d7d5878..b3720acca0da45b25828661a93d69f4e907e34af 100644 (file)
@@ -40,4 +40,6 @@ extern int php3_mshutdown_browscap(SHUTDOWN_FUNC_ARGS);
 extern void php3_get_browser(INTERNAL_FUNCTION_PARAMETERS);
 
 
+#define phpext_browscap_ptr browscap_module_ptr
+
 #endif /* _PHP3_BROWSCAP_H */
index c740dc55ec512351f12163aec01eaf2cadd22e74..20671b2f6f795ba3e1de90b4dbc84bdb2fb2d63e 100644 (file)
@@ -10,4 +10,6 @@ extern int php_minit_crypt(INIT_FUNC_ARGS);
 #define crypt_module_ptr NULL
 #endif
 
+#define phpext_crypt_ptr crypt_module_ptr
+
 #endif
index ee0e719dd76ed7c3cb05b57e1ffe281580c7a4d1..33e6f156432ab752add0d1e4b2905cdcef3e9afc 100644 (file)
@@ -45,4 +45,6 @@ extern void php3_rewinddir(INTERNAL_FUNCTION_PARAMETERS);
 extern void php3_readdir(INTERNAL_FUNCTION_PARAMETERS);
 extern void php3_getdir(INTERNAL_FUNCTION_PARAMETERS);
 
+#define phpext_dir_ptr php3_dir_module_ptr
+
 #endif /* _PHP3_DIR_H */
index 6c82124b363f1df38ab49aec12c77f646dba42cd..87ac93a6976a9ead24a07b26136b0517d8f0ce0c 100644 (file)
@@ -61,4 +61,6 @@ extern void php3_touch(INTERNAL_FUNCTION_PARAMETERS);
 extern php3_module_entry php3_filestat_module_entry;
 #define php3_filestat_module_ptr &php3_filestat_module_entry
 
+#define phpext_filestat_ptr php3_filestat_module_ptr
+
 #endif /* _FILESTAT_H */
index 71ac97fe8f1a6c52701f66da6b9056510381edc0..cd2acabfafd1b35ed2edc1908a062b78df34dc87 100644 (file)
@@ -43,4 +43,7 @@ extern int _php3_mail(char *to, char *subject, char *message, char *headers);
 #else
 #define mail_module_ptr NULL
 #endif
+
+#define phpext_mail_ptr mail_module_ptr
+
 #endif /* _MAIL_H */
index 028a5aa0186fdd35066f10dac251e9a75ac597bb..458e597254958e9f9dd92516b254395ac97a0663 100644 (file)
    |                                                                      |
    +----------------------------------------------------------------------+
  */
+
+#ifndef _PHP_SYSLOG_H
+#define _PHP_SYSLOG_H
+
 #if HAVE_SYSLOG_H
 extern php3_module_entry syslog_module_entry;
 #define syslog_module_ptr &syslog_module_entry
@@ -42,3 +46,7 @@ extern void php3_define_syslog_variables(INTERNAL_FUNCTION_PARAMETERS);
 #else
 #define syslog_module_ptr NULL
 #endif
+
+#define phpext_syslog_ptr syslog_module_ptr
+
+#endif /* _PHP_SYSLOG_H */
index 4b144063db80849002ee7de0b11b8257d042f7bc..d849b80fafd8afe2e1fcdd8ec86a79b2093b7074 100644 (file)
 #include <stdio.h>
 
 #include "ext/standard/reg.h"
+#include "ext/standard/dl.h"
+#include "ext/standard/file.h"
+#include "ext/standard/fsock.h"
+#include "ext/standard/head.h"
+#include "ext/standard/pack.h"
+#include "ext/standard/php3_browscap.h"
+#include "ext/standard/php3_crypt.h"
+#include "ext/standard/php3_dir.h"
+#include "ext/standard/php3_filestat.h"
+#include "ext/standard/php3_mail.h"
+#include "ext/standard/php3_syslog.h"
 @EXT_INCLUDE_CODE@
 
 /* SNMP has to be moved to ext */
@@ -53,6 +64,17 @@ unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
 
 zend_module_entry *php3_builtin_modules[] = {
        phpext_regex_ptr,
+       phpext_dl_ptr,
+       phpext_file_ptr,
+       phpext_fsock_ptr,
+       phpext_head_ptr,
+       phpext_pack_ptr,
+       phpext_browscap_ptr,
+       phpext_crypt_ptr,
+       phpext_dir_ptr,
+       phpext_filestat_ptr,
+       phpext_mail_ptr,
+       phpext_syslog_ptr,
 @EXT_MODULE_PTRS@
 };