You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/21 19:05:01 UTC
svn commit: r767226 - in /commons/sandbox/runtime/trunk/src/main/native:
include/acr_private.h test/testcase.c
Author: mturk
Date: Tue Apr 21 17:05:00 2009
New Revision: 767226
URL: http://svn.apache.org/viewvc?rev=767226&view=rev
Log:
Add _PTEXT macro
Modified:
commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h?rev=767226&r1=767225&r2=767226&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h Tue Apr 21 17:05:00 2009
@@ -76,8 +76,10 @@
#define WSTR_TO_JSTRING(V) ACR_NewJavaStringW(_E, (const wchar_t *)(V))
#if defined(_MSC_VER)
#define PSTR_TO_JSTRING(V) ACR_NewJavaStringW(_E, (const wchar_t *)(V))
+#define _PTEXT(X) L ## X
#else
#define PSTR_TO_JSTRING(V) ACR_NewJavaStringA(_E, (const char *)(V))
+#define _PTEXT(X) X
#endif
#define USTR_TO_JSTRING(V) (*_E)->NewStringUTF(_E, (const char *)(V))
Modified: commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testcase.c?rev=767226&r1=767225&r2=767226&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testcase.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testcase.c Tue Apr 21 17:05:00 2009
@@ -310,7 +310,7 @@
ACR_JNI_EXPORT_DECLARE(jobject, TestPrivate, test029)(ACR_JNISTDARGS, int d)
{
ldfile(_E);
- return ACR_IoFileObjectCreate(_E, "/tmp/foo", -1);
+ return ACR_IoFileObjectCreate(_E, _PTEXT("/tmp/foo"), -1);
}