For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > August 2005 > cvs: ZendEngine2 / zend_exceptions.c zend_opcode.c









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2 / zend_exceptions.c zend_opcode.c
Marcus Boerger

2005-08-13, 3:59 am

helly Fri Aug 12 21:31:16 2005 EDT

Modified files:
/ZendEngine2 zend_exceptions.c zend_opcode.c
Log:
- Unicode
# We probably might want to move spprintf.c/h into Zend now


http://cvs.php.net/diff.php/ZendEng...82&r2=1.83&ty=u
Index: ZendEngine2/zend_exceptions.c
diff -u ZendEngine2/zend_exceptions.c:1.82 ZendEngine2/zend_exceptions.c:1.83
--- ZendEngine2/zend_exceptions.c:1.82 Fri Aug 12 10:08:19 2005
+++ ZendEngine2/zend_exceptions.c Fri Aug 12 21:31:14 2005
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_exceptions.c,v 1.82 2005/08/12 14:08:19 sebastian Exp $ */
+/* $Id: zend_exceptions.c,v 1.83 2005/08/13 01:31:14 helly Exp $ */

#include "zend.h"
#include "zend_API.h"
@@ -448,7 +448,7 @@
}
/* }}} */

-static int zend_spprintf(char **message, int max_len, char *format, ...)
+int zend_spprintf(char **message, int max_len, char *format, ...)
{
va_list arg;
int len;
http://cvs.php.net/diff.php/ZendEng...1&r2=1.112&ty=u
Index: ZendEngine2/zend_opcode.c
diff -u ZendEngine2/zend_opcode.c:1.111 ZendEngine2/zend_opcode.c:1.112
--- ZendEngine2/zend_opcode.c:1.111 Thu Aug 11 19:34:58 2005
+++ ZendEngine2/zend_opcode.c Fri Aug 12 21:31:14 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_opcode.c,v 1.111 2005/08/11 23:34:58 andrei Exp $ */
+/* $Id: zend_opcode.c,v 1.112 2005/08/13 01:31:14 helly Exp $ */

#include <stdio.h>

@@ -29,6 +29,8 @@

#include "zend_vm.h"

+extern int zend_spprintf(char **message, int max_len, char *format, ...);
+
static void zend_extension_op_array_ctor_handler(zen
d_extension *extension, zend_op_array *op_array TSRMLS_DC)
{
if (extension->op_array_ctor) {
@@ -386,10 +388,15 @@

int print_class(zend_class_entry *class_entry TSRMLS_DC)
{
- /* UTODO: fix these to use spprintf() */
- printf("Class %v:\n", class_entry->name);
+ char *tmp;
+
+ zend_spprintf(&tmp, 0, "Class %v:\n", class_entry->name);
+ printf("%s", tmp);
+ efree(tmp);
zend_hash_apply(&class_entry->function_table, (apply_func_t) pass_two TSRMLS_CC);
- printf("End of class %v.\n\n", class_entry->name);
+ zend_spprintf(&tmp, 0, "End of class %v.\n\n", class_entry->name);
+ printf("%s", tmp);
+ efree(tmp);
return 0;
}

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com