]> gitweb @ CieloNegro.org - bindings-apr.git/commitdiff
apr_month_snames and apr_day_snames should be #globalarray
authorPHO <pho@cielonegro.org>
Tue, 31 Aug 2010 15:54:55 +0000 (00:54 +0900)
committerPHO <pho@cielonegro.org>
Tue, 31 Aug 2010 15:54:55 +0000 (00:54 +0900)
Bindings/APR/Time.hsc
cbits/helper_apr_time.c

index 9c7032286460fa27f6037f8f320ce97fc4981410..2c9722d9b0acea70a19bbd0735b98786e91eefac 100644 (file)
@@ -7,9 +7,8 @@ import Bindings.APR
 import Bindings.APR.ErrNo
 import Bindings.APR.Pools
 
--- Isn't there a better way than this?
-#pointer apr_month_snames
-#pointer apr_day_snames
+#globalarray apr_month_snames, Ptr (Ptr CChar)
+#globalarray apr_day_snames  , Ptr (Ptr CChar)
 
 #integral_t apr_time_t
 #pointer APR_TIME_T_FMT
index 9c22ba6f5167c9c987fb0206924e579c8220f132..54e0f3748cdd06dd910152935ccdf756e9d4e861 100644 (file)
@@ -1,6 +1,14 @@
 #include <bindings.cmacros.h>
 #include <apr_time.h>
 
+const char (*array_apr_month_snames(void))[12][4] {
+    return &apr_month_snames;
+}
+
+const char (*array_apr_day_snames(void))[7][4] {
+    return &apr_day_snames;
+}
+
 BC_INLINE1(apr_time_sec , apr_time_t, apr_time_t)
 BC_INLINE1(apr_time_usec, apr_time_t, apr_time_t)
 BC_INLINE1(apr_time_msec, apr_time_t, apr_time_t)