(libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
[m17n/m17n-lib.git] / src / internal.h
index 13f2b49..f518924 100644 (file)
     longer version of internal.h description 
 */
 
+extern int m17n__core_initialized;
+extern int m17n__shell_initialized;
+extern int m17n__gui_initialized;
+
 extern int mdebug_hook ();
 
 /** Return with code RET while setting merror_code to ERR.  */
@@ -241,19 +245,23 @@ typedef struct
 typedef struct
 {
   /**en Reference count of the object.  */
+  /**ja ¥ª¥Ö¥¸¥§¥¯¥È¤Î»²¾È¿ô.  */
   unsigned ref_count : 16;
 
   unsigned ref_count_extended : 1;
 
   /**en A flag bit used for various perpose.  */
+  /**ja ¤µ¤Þ¤¶¤Þ¤ÊÌÜŪ¤ËÍѤ¤¤é¤ì¤ë¥Õ¥é¥°¥Ó¥Ã¥È.  */
   unsigned flag : 15;
 
   union {
     /**en If <ref_count_extended> is zero, a function to free the
        object.  */
+    /**ja <ref_count_extended> ¤¬ 0 ¤Ê¤é¤Ð¥ª¥Ö¥¸¥§¥¯¥È¤ò²òÊü¤¹¤ë´Ø¿ô.  */
     void (*freer) (void *);
     /**en If <ref_count_extended> is nonzero, a pointer to the
        struct M17NObjectRecord.  */
+    /**ja <ref_count_extended> ¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¹½Â¤ÂΠM17NObjectRecord ¤Ø¤Î¥Ý¥¤¥ó¥¿.  */
     M17NObjectRecord *record;
   } u;
 } M17NObject;
@@ -271,6 +279,7 @@ typedef struct
 
 /**en Increment the reference count of OBJECT if the count is not
    0.  */
+/**ja OBJECT ¤Î»²¾È¿ô¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð 1 Áý¤ä¤¹.  */
 
 #define M17N_OBJECT_REF(object)                                \
   do {                                                 \
@@ -311,7 +320,9 @@ typedef struct
 
 
 /**en Decrement the reference count of OBJECT if the count is greater
-    than 0.  In that case, if the count becomes 0, free OBJECT.  */
+      than 0.  In that case, if the count becomes 0, free OBJECT.  */
+/**ja OBJECT ¤Î»²¾È¿ô¤¬ 0 ¤è¤êÂ礭¤±¤ì¤Ð 1 ¸º¤é¤¹¡£¸º¤é¤·¤Æ 0 ¤Ë¤Ê¤ì¤Ð
+      OBJECT ¤ò²òÊü¤¹¤ë.  */
 
 #define M17N_OBJECT_UNREF(object)                              \
   do {                                                         \
@@ -329,6 +340,7 @@ typedef struct
              (((M17NObject *) (object))->u.freer) (object);    \
            else                                                \
              free (object);                                    \
+           (object) = NULL;                                    \
          }                                                     \
       }                                                                \
   } while (0)