cvs: embed /php-irssi channel.c ext-irssi.c genobjdefs.php nick.c php-core.c php-irssi-obj.c php-irssi-obj.h php-irssi.h server.c win-item.c window.c
[email protected] ("Tal Peer") Tue, 11 Mar 2003 14:15:25 -0000
| Newsgroups | php.embed.cvs |
|---|---|
| Message-ID | <cvstal1047392125@cvsserver> |
--tal1047392125
Content-Type: text/plain
tal Tue Mar 11 09:15:25 2003 EDT
Modified files:
/embed/php-irssi channel.c ext-irssi.c genobjdefs.php nick.c
php-core.c php-irssi-obj.c php-irssi-obj.h
php-irssi.h server.c win-item.c window.c
Log:
Nuke most of the non-Zend warnings
--tal1047392125
Content-Type: text/plain
Content-Disposition: attachment; filename="tal-20030311091525.txt"
Index: embed/php-irssi/channel.c
diff -u embed/php-irssi/channel.c:1.6 embed/php-irssi/channel.c:1.7
--- embed/php-irssi/channel.c:1.6 Fri Mar 7 04:35:28 2003
+++ embed/php-irssi/channel.c Tue Mar 11 09:15:24 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: channel.c,v 1.6 2003/03/07 09:35:28 wez Exp $
+ $Id: channel.c,v 1.7 2003/03/11 14:15:24 tal Exp $
*/
#include "php-irssi.h"
#define PHP_IRSSI_PROTOS_ONLY
@@ -139,7 +139,7 @@
PHP_NAMED_FE(nick_find, PHP_FN(channel_nick_find), NULL)
PHP_NAMED_FE(nick_find_mask, PHP_FN(channel_nick_find_mask), NULL)
PHP_NAMED_FE(send, PHP_FN(channel_send), NULL)
- NULL, NULL, NULL
+ {NULL, NULL, NULL}
};
Index: embed/php-irssi/ext-irssi.c
diff -u embed/php-irssi/ext-irssi.c:1.17 embed/php-irssi/ext-irssi.c:1.18
--- embed/php-irssi/ext-irssi.c:1.17 Fri Mar 7 05:04:09 2003
+++ embed/php-irssi/ext-irssi.c Tue Mar 11 09:15:25 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: ext-irssi.c,v 1.17 2003/03/07 10:04:09 wez Exp $
+ $Id: ext-irssi.c,v 1.18 2003/03/11 14:15:25 tal Exp $
*/
#include "php-irssi.h"
#include "php-signals-list.h" /* generated by php during make */
@@ -147,10 +147,8 @@
const void *p4, const void *p5, const void *p6)
{
const void *args[6];
- int sigid = signal_get_emitted_id();
struct sig_record *rec = (struct sig_record*)signal_get_user_data();
- zval ***zargs = NULL;
- zval *val, *retval = NULL, *func_name = NULL;
+ zval *val, *retval = NULL, *func_name = NULL, ***zargs = NULL;
int i, argc = 0, call_result;
args[0] = p1; args[1] = p2; args[2] = p3;
@@ -292,7 +290,7 @@
{
zval **zargs[1] = { NULL };
zval *arg = NULL, *retval = NULL;
- int argc = 0, i;
+ int argc = 0;
if (rec->arg) {
MAKE_STD_ZVAL(arg);
@@ -347,9 +345,8 @@
Requests that callback be called every msecsinterval. */
PHP_FUNCTION(irssi_timeout_add)
{
- zval *sigarg = NULL, *funcname, *tmp;
+ zval *sigarg = NULL, *funcname;
long msecsinterval;
- int sigid;
struct sig_record *rec;
char *sighash = NULL;
zend_bool oneshot = 0;
@@ -461,7 +458,7 @@
Binds a function to a command. priority is one of the IRSSI_PRIORITY_XXX constants */
PHP_FUNCTION(irssi_command_bind)
{
- zval *sigarg = NULL, *funcname, *tmp;
+ zval *sigarg = NULL, *funcname;
char *signame;
long signame_len;
long priority = SIGNAL_PRIORITY_DEFAULT;
@@ -519,7 +516,7 @@
Binds a function to a signal. priority is one of the IRSSI_PRIORITY_XXX constants */
PHP_FUNCTION(irssi_signal_add)
{
- zval *sigarg = NULL, *funcname, *tmp;
+ zval *sigarg = NULL, *funcname;
char *signame;
long signame_len;
long priority = SIGNAL_PRIORITY_DEFAULT;
@@ -655,12 +652,10 @@
/* Un-bind a signal */
PHP_FUNCTION(irssi_signal_remove)
{
- zval *sigarg = NULL, *funcname, *tmp;
- char *signame;
+ zval *sigarg = NULL, *funcname;
+ char *signame, *sighash = NULL;
long signame_len;
- int sigid;
struct sig_record **rec;
- char *sighash = NULL;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|z!",
&signame, &signame_len,
@@ -690,12 +685,10 @@
PHP_FUNCTION(irssi_command_unbind)
{
- zval *sigarg = NULL, *funcname, *tmp;
- char *signame;
+ zval *sigarg = NULL, *funcname;
+ char *signame, *sighash = NULL;
long signame_len;
- int sigid;
struct sig_record **rec;
- char *sighash = NULL;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|z!",
&signame, &signame_len,
@@ -832,7 +825,7 @@
PHP_FE(irssi_window_find_name, NULL)
PHP_FE(irssi_command_bind, NULL)
PHP_FE(irssi_command_unbind, NULL)
- NULL, NULL, NULL
+ {NULL, NULL, NULL}
};
zend_module_entry php_irssi_module_entry = {
Index: embed/php-irssi/genobjdefs.php
diff -u embed/php-irssi/genobjdefs.php:1.8 embed/php-irssi/genobjdefs.php:1.9
--- embed/php-irssi/genobjdefs.php:1.8 Tue Mar 11 07:44:08 2003
+++ embed/php-irssi/genobjdefs.php Tue Mar 11 09:15:25 2003
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: genobjdefs.php,v 1.8 2003/03/11 12:44:08 tal Exp $
+ $Id: genobjdefs.php,v 1.9 2003/03/11 14:15:25 tal Exp $
*/
/* We build three sets of tables:
@@ -112,6 +112,7 @@
}
/* Emit code */
+ printf("/* Automatically created from %s at %s */\n\n", basename($_SERVER[PHP_SELF]), date("Y-m-d H:i:s", time()));
printf("#ifndef PHP_IRSSI_PROTOS_ONLY\n");
printf("struct php_irssi_class_props php_irssi_%s_props[] = {\n", $iclass);
Index: embed/php-irssi/nick.c
diff -u embed/php-irssi/nick.c:1.5 embed/php-irssi/nick.c:1.6
--- embed/php-irssi/nick.c:1.5 Fri Mar 7 04:35:29 2003
+++ embed/php-irssi/nick.c Tue Mar 11 09:15:25 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: nick.c,v 1.5 2003/03/07 09:35:29 wez Exp $
+ $Id: nick.c,v 1.6 2003/03/11 14:15:25 tal Exp $
*/
#include "php-irssi.h"
#define PHP_IRSSI_PROTOS_ONLY
@@ -89,7 +89,7 @@
function_entry php_irssi_NICK_funcs[] = {
- NULL, NULL, NULL
+ {NULL, NULL, NULL}
};
Index: embed/php-irssi/php-core.c
diff -u embed/php-irssi/php-core.c:1.13 embed/php-irssi/php-core.c:1.14
--- embed/php-irssi/php-core.c:1.13 Fri Mar 7 05:04:09 2003
+++ embed/php-irssi/php-core.c Tue Mar 11 09:15:25 2003
@@ -15,7 +15,7 @@
| Authors: Wez Furlong <[email protected]> |
| Tal Peer <[email protected]> |
+----------------------------------------------------------------------+
- $Id: php-core.c,v 1.13 2003/03/07 10:04:09 wez Exp $
+ $Id: php-core.c,v 1.14 2003/03/11 14:15:25 tal Exp $
*/
#define MODULE_NAME "php/core"
#include "common.h"
@@ -29,6 +29,7 @@
#include "levels.h"
#include "fe-windows.h"
#include "lib-config/iconfig.h" /* FIXME: remove before .99 */
+#include "printtext.h"
#include "php-irssi.h"
#include <php_embed.h>
@@ -122,7 +123,6 @@
static void init_php(void)
{
- int retval;
static char *argv[2] = {"irssi", NULL};
/* override PHP/ZE output */
Index: embed/php-irssi/php-irssi-obj.c
diff -u embed/php-irssi/php-irssi-obj.c:1.7 embed/php-irssi/php-irssi-obj.c:1.8
--- embed/php-irssi/php-irssi-obj.c:1.7 Fri Mar 7 04:35:29 2003
+++ embed/php-irssi/php-irssi-obj.c Tue Mar 11 09:15:25 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: php-irssi-obj.c,v 1.7 2003/03/07 09:35:29 wez Exp $
+ $Id: php-irssi-obj.c,v 1.8 2003/03/11 14:15:25 tal Exp $
*/
#include "php-irssi.h"
#include "php-irssi-obj-defs.h"
@@ -122,9 +122,7 @@
{
struct php_irssi_obj_ref *ref = zend_object_store_get_object(object TSRMLS_CC);
zval tmp_member;
- zval *retval = NULL;
struct php_irssi_class_props **props;
- void *arg;
if (member->type != IS_STRING) {
tmp_member = *member;
@@ -149,7 +147,6 @@
static union _zend_function* pih_get_method(zval *object, char *method, int method_len TSRMLS_DC)
{
struct php_irssi_obj_ref *ref = zend_object_store_get_object(object TSRMLS_CC);
- struct php_irssi_class_props **props;
zend_function *func_method;
if (zend_hash_find(ref->binding->hfuncs, method, method_len+1, (void **)&func_method) == FAILURE) {
@@ -185,10 +182,12 @@
}
+#if 0 /* why do we have that? */
static int pih_compare_objects(zval *o1, zval *o2 TSRMLS_DC)
{
return FAILURE;
}
+#endif
zend_object_handlers php_irssi_handlers = {
ZEND_OBJECTS_STORE_HANDLERS,
@@ -277,7 +276,7 @@
-int php_irssi_init_objects(void)
+void php_irssi_init_objects(void)
{
int i, j;
struct php_irssi_obj_bind *bind;
@@ -319,9 +318,8 @@
void php_irssi_fini_objects(void)
{
- int i, j;
+ int i;
struct php_irssi_obj_bind *bind;
- struct php_irssi_class_props *props;
/* bind the bindtypes to names */
for (i = 0; php_irssi_object_bindings[i].bindname != NULL; i++) {
Index: embed/php-irssi/php-irssi-obj.h
diff -u embed/php-irssi/php-irssi-obj.h:1.1 embed/php-irssi/php-irssi-obj.h:1.2
--- embed/php-irssi/php-irssi-obj.h:1.1 Thu Jan 30 04:04:35 2003
+++ embed/php-irssi/php-irssi-obj.h Tue Mar 11 09:15:25 2003
@@ -14,17 +14,19 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: php-irssi-obj.h,v 1.1 2003/01/30 09:04:35 wez Exp $
+ $Id: php-irssi-obj.h,v 1.2 2003/03/11 14:15:25 tal Exp $
*/
extern zend_object_handlers php_irssi_handlers;
zend_object_value php_irssi_create_wrapper(struct php_irssi_obj_ref **ref, char *objname, zval *zobj TSRMLS_DC);
struct php_irssi_obj_ref *php_irssi_ref_from_wrapper(zval *obj, char *objname TSRMLS_DC);
-int php_irssi_init_objects(void);
-
+void php_irssi_init_objects(void);
+void php_irssi_fini_objects(void);
void php_irssi_C_to_PHP(zval **val, int type, void *arg TSRMLS_DC);
void php_irssi_export_NICK(zval *obj, CHANNEL_REC *cr, NICK_REC *nr TSRMLS_DC);
void php_irssi_export_CHANNEL(zval *obj, CHANNEL_REC *cr TSRMLS_DC);
void php_irssi_export_SERVER(zval *obj, SERVER_REC *srv TSRMLS_DC);
+void php_irssi_export_WINDOW(zval *obj, WINDOW_REC *win TSRMLS_DC);
+void php_irssi_export_WI_ITEM(zval *obj, WI_ITEM_REC *wi TSRMLS_DC);
void export_GList(zval *val, GSList *the_list TSRMLS_DC);
Index: embed/php-irssi/php-irssi.h
diff -u embed/php-irssi/php-irssi.h:1.6 embed/php-irssi/php-irssi.h:1.7
--- embed/php-irssi/php-irssi.h:1.6 Sat Feb 1 22:27:16 2003
+++ embed/php-irssi/php-irssi.h Tue Mar 11 09:15:25 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: php-irssi.h,v 1.6 2003/02/02 03:27:16 wez Exp $
+ $Id: php-irssi.h,v 1.7 2003/03/11 14:15:25 tal Exp $
*/
#define MODULE_NAME "php/core"
@@ -34,6 +34,7 @@
#include "levels.h"
#include "fe-windows.h"
#include "lib-config/iconfig.h" /* FIXME: remove before .99 */
+#include "printtext.h"
#include <php_embed.h>
@@ -123,6 +124,6 @@
#define CH_FETCH() CHANNEL_REC *channel = map_channel(getThis() TSRMLS_CC); if (channel == NULL) RETURN_NULL();
#define NK_FETCH() CHANNEL_REC *channel; NICK_REC *nick = map_nick(getThis(), &channel TSRMLS_CC); if (channel == NULL || nick == NULL) RETURN_NULL();
-#define WI_FETCH() WI_ITEM_REC *wi; map_wi_item(getThis() TSRMLS_CC); if (wi == NULL) RETURN_NULL();
-#define WINDOW_FETCH() WINDOW_REC *window; map_window(getThis() TSRMLS_CC); if (window == NULL) RETURN_NULL();
+#define WI_FETCH() WI_ITEM_REC *wi = map_wi_item(getThis() TSRMLS_CC); if (wi == NULL) RETURN_NULL();
+#define WINDOW_FETCH() WINDOW_REC *window = map_window(getThis() TSRMLS_CC); if (window == NULL) RETURN_NULL();
Index: embed/php-irssi/server.c
diff -u embed/php-irssi/server.c:1.5 embed/php-irssi/server.c:1.6
--- embed/php-irssi/server.c:1.5 Fri Mar 7 05:04:09 2003
+++ embed/php-irssi/server.c Tue Mar 11 09:15:25 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: server.c,v 1.5 2003/03/07 10:04:09 wez Exp $
+ $Id: server.c,v 1.6 2003/03/11 14:15:25 tal Exp $
*/
#include "php-irssi.h"
@@ -137,7 +137,7 @@
PHP_NAMED_FE(send_cmd, PHP_FN(server_send_cmd), NULL)
PHP_NAMED_FE(send_cmd_now, PHP_FN(server_send_cmd_now), NULL)
PHP_NAMED_FE(channels_join, PHP_FN(server_channels_join), NULL)
- NULL, NULL, NULL
+ {NULL, NULL, NULL}
};
Index: embed/php-irssi/win-item.c
diff -u embed/php-irssi/win-item.c:1.1 embed/php-irssi/win-item.c:1.2
--- embed/php-irssi/win-item.c:1.1 Sat Feb 1 20:33:46 2003
+++ embed/php-irssi/win-item.c Tue Mar 11 09:15:25 2003
@@ -14,9 +14,10 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: win-item.c,v 1.1 2003/02/02 01:33:46 wez Exp $
+ $Id: win-item.c,v 1.2 2003/03/11 14:15:25 tal Exp $
*/
#include "php-irssi.h"
+#include "window-items.h"
#define PHP_IRSSI_PROTOS_ONLY
#include "php-irssi-obj-defs.h"
@@ -91,7 +92,7 @@
function_entry php_irssi_WI_ITEM_funcs[] = {
PHP_NAMED_FE(is_active_item, PHP_FN(window_item_is_active), NULL)
- NULL, NULL, NULL
+ {NULL, NULL, NULL}
};
Index: embed/php-irssi/window.c
diff -u embed/php-irssi/window.c:1.4 embed/php-irssi/window.c:1.5
--- embed/php-irssi/window.c:1.4 Fri Mar 7 04:35:29 2003
+++ embed/php-irssi/window.c Tue Mar 11 09:15:25 2003
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Wez Furlong <[email protected]> |
+----------------------------------------------------------------------+
- $Id: window.c,v 1.4 2003/03/07 09:35:29 wez Exp $
+ $Id: window.c,v 1.5 2003/03/11 14:15:25 tal Exp $
*/
#include "php-irssi.h"
@@ -113,7 +113,7 @@
PHP_NAMED_FE(set_active, PHP_FN(window_set_active), NULL)
PHP_NAMED_FE(get_active_name, PHP_FN(window_get_active_name), NULL)
PHP_NAMED_FE(print_text, PHP_FN(window_print_text), NULL)
- NULL, NULL, NULL
+ {NULL, NULL, NULL}
};
--tal1047392125--