pajoye Thu, 25 Nov 2010 23:06:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305761
Log:
- cleanup broken double definition of php_win_err and rename it while being
there
Changed paths:
U php/php-src/trunk/Zend/zend_language_scanner.c
U php/php-src/trunk/Zend/zend_language_scanner_defs.h
U php/php-src/trunk/ext/com_dotnet/com_com.c
U php/php-src/trunk/ext/com_dotnet/com_dotnet.c
U php/php-src/trunk/ext/com_dotnet/com_misc.c
U php/php-src/trunk/ext/com_dotnet/com_olechar.c
U php/php-src/trunk/ext/com_dotnet/com_variant.c
U php/php-src/trunk/ext/com_dotnet/php_com_dotnet_internal.h
U php/php-src/trunk/win32/winutil.c
U php/php-src/trunk/win32/winutil.h
Modified: php/php-src/trunk/Zend/zend_language_scanner.c
===================================================================
--- php/php-src/trunk/Zend/zend_language_scanner.c 2010-11-25 22:49:58 UTC
(rev 305760)
+++ php/php-src/trunk/Zend/zend_language_scanner.c 2010-11-25 23:06:12 UTC
(rev 305761)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Nov 24 08:41:46 2010 */
+/* Generated by re2c 0.13.5 on Thu Nov 25 23:17:48 2010 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
Modified: php/php-src/trunk/Zend/zend_language_scanner_defs.h
===================================================================
--- php/php-src/trunk/Zend/zend_language_scanner_defs.h 2010-11-25 22:49:58 UTC
(rev 305760)
+++ php/php-src/trunk/Zend/zend_language_scanner_defs.h 2010-11-25 23:06:12 UTC
(rev 305761)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Nov 24 08:41:46 2010 */
+/* Generated by re2c 0.13.5 on Thu Nov 25 23:17:48 2010 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
Modified: php/php-src/trunk/ext/com_dotnet/com_com.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_com.c 2010-11-25 22:49:58 UTC (rev
305760)
+++ php/php-src/trunk/ext/com_dotnet/com_com.c 2010-11-25 23:06:12 UTC (rev
305761)
@@ -224,7 +224,7 @@
if (FAILED(res)) {
char *werr, *msg;
- werr = php_win_err(res);
+ werr = php_win32_error_to_msg(res);
spprintf(&msg, 0, "Failed to create COM object `%s': %s",
module_name, werr);
LocalFree(werr);
@@ -383,7 +383,7 @@
case DISP_E_PARAMNOTFOUND:
case DISP_E_TYPEMISMATCH:
- desc = php_win_err(hr);
+ desc = php_win32_error_to_msg(hr);
spprintf(&msg, 0, "Parameter %d: %s", arg_err,
desc);
LocalFree(desc);
break;
@@ -399,7 +399,7 @@
/* else fall through */
default:
- desc = php_win_err(hr);
+ desc = php_win32_error_to_msg(hr);
spprintf(&msg, 0, "Error [0x%08x] %s", hr,
desc);
LocalFree(desc);
break;
@@ -481,7 +481,7 @@
if (FAILED(hr)) {
char *winerr = NULL;
char *msg = NULL;
- winerr = php_win_err(hr);
+ winerr = php_win32_error_to_msg(hr);
spprintf(&msg, 0, "Unable to lookup `%s': %s", name, winerr);
LocalFree(winerr);
php_com_throw_exception(hr, msg TSRMLS_CC);
@@ -640,7 +640,7 @@
hr = php_com_get_id_of_name(obj, name, namelen, &dispid TSRMLS_CC);
if (FAILED(hr)) {
- winerr = php_win_err(hr);
+ winerr = php_win32_error_to_msg(hr);
spprintf(&msg, 0, "Unable to lookup `%s': %s", name, winerr);
LocalFree(winerr);
php_com_throw_exception(hr, msg TSRMLS_CC);
Modified: php/php-src/trunk/ext/com_dotnet/com_dotnet.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_dotnet.c 2010-11-25 22:49:58 UTC
(rev 305760)
+++ php/php-src/trunk/ext/com_dotnet/com_dotnet.c 2010-11-25 23:06:12 UTC
(rev 305761)
@@ -199,7 +199,7 @@
hr = dotnet_init(&where TSRMLS_CC);
if (FAILED(hr)) {
char buf[1024];
- char *err = php_win_err(hr);
+ char *err = php_win32_error_to_msg(hr);
snprintf(buf, sizeof(buf), "Failed to init .Net runtime
[%s] %s", where, err);
if (err)
LocalFree(err);
@@ -278,7 +278,7 @@
if (ret == FAILURE) {
char buf[1024];
- char *err = php_win_err(hr);
+ char *err = php_win32_error_to_msg(hr);
snprintf(buf, sizeof(buf), "Failed to instantiate .Net object
[%s] [0x%08x] %s", where, hr, err);
if (err && err[0]) {
LocalFree(err);
Modified: php/php-src/trunk/ext/com_dotnet/com_misc.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_misc.c 2010-11-25 22:49:58 UTC (rev
305760)
+++ php/php-src/trunk/ext/com_dotnet/com_misc.c 2010-11-25 23:06:12 UTC (rev
305761)
@@ -33,7 +33,7 @@
{
int free_msg = 0;
if (message == NULL) {
- message = php_win_err(code);
+ message = php_win32_error_to_msg(code);
free_msg = 1;
}
zend_throw_exception(php_com_exception_class_entry, message, (long)code
TSRMLS_CC);
Modified: php/php-src/trunk/ext/com_dotnet/com_olechar.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_olechar.c 2010-11-25 22:49:58 UTC
(rev 305760)
+++ php/php-src/trunk/ext/com_dotnet/com_olechar.c 2010-11-25 23:06:12 UTC
(rev 305761)
@@ -54,7 +54,7 @@
}
if (!ok) {
- char *msg = php_win_err(GetLastError());
+ char *msg = php_win32_error_to_msg(GetLastError());
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Could not convert string to unicode: `%s'", msg);
@@ -87,7 +87,7 @@
}
if (!ok) {
- char *msg = php_win_err(err);
+ char *msg = php_win32_error_to_msg(err);
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Could not convert string from unicode: `%s'", msg);
Modified: php/php-src/trunk/ext/com_dotnet/com_variant.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_variant.c 2010-11-25 22:49:58 UTC
(rev 305760)
+++ php/php-src/trunk/ext/com_dotnet/com_variant.c 2010-11-25 23:06:12 UTC
(rev 305761)
@@ -446,7 +446,7 @@
if (FAILED(res)) {
char *werr, *msg;
- werr = php_win_err(res);
+ werr = php_win32_error_to_msg(res);
spprintf(&msg, 0, "Variant type conversion
failed: %s", werr);
LocalFree(werr);
@@ -1022,7 +1022,7 @@
} else {
char *werr, *msg;
- werr = php_win_err(res);
+ werr = php_win32_error_to_msg(res);
spprintf(&msg, 0, "Variant type conversion failed: %s", werr);
LocalFree(werr);
@@ -1056,7 +1056,7 @@
} else {
char *werr, *msg;
- werr = php_win_err(res);
+ werr = php_win32_error_to_msg(res);
spprintf(&msg, 0, "Variant type conversion failed: %s", werr);
LocalFree(werr);
Modified: php/php-src/trunk/ext/com_dotnet/php_com_dotnet_internal.h
===================================================================
--- php/php-src/trunk/ext/com_dotnet/php_com_dotnet_internal.h 2010-11-25
22:49:58 UTC (rev 305760)
+++ php/php-src/trunk/ext/com_dotnet/php_com_dotnet_internal.h 2010-11-25
23:06:12 UTC (rev 305761)
@@ -29,9 +29,6 @@
#include <dispex.h>
#include "win32/winutil.h"
-/* brain-death in winutil.h defines the macro to hide the useful function... */
-#undef php_win_err
-
typedef struct _php_com_dotnet_object {
zend_object zo;
Modified: php/php-src/trunk/win32/winutil.c
===================================================================
--- php/php-src/trunk/win32/winutil.c 2010-11-25 22:49:58 UTC (rev 305760)
+++ php/php-src/trunk/win32/winutil.c 2010-11-25 23:06:12 UTC (rev 305761)
@@ -22,7 +22,7 @@
#include "php.h"
#include <wincrypt.h>
-PHPAPI char *php_win_err(int error)
+PHPAPI char *php_win32_error_to_msg(int error)
{
char *buf = NULL;
@@ -75,3 +75,4 @@
return FAILURE;
}
/* }}} */
+
Modified: php/php-src/trunk/win32/winutil.h
===================================================================
--- php/php-src/trunk/win32/winutil.h 2010-11-25 22:49:58 UTC (rev 305760)
+++ php/php-src/trunk/win32/winutil.h 2010-11-25 23:06:12 UTC (rev 305761)
@@ -16,8 +16,8 @@
+----------------------------------------------------------------------+
*/
-PHPAPI char *php_win_err(int error);
+PHPAPI char *php_win32_error_to_msg(int error);
-#define php_win_err() php_win_err(GetLastError())
+#define php_win_err() php_win32_error_to_msg(GetLastError())
int php_win32_check_trailing_space(const char * path, const int path_len);
PHPAPI php_win32_get_random_bytes(unsigned char *buf, size_t size);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php