[前][次][番号順一覧][スレッド一覧]

ruby-changes:3827

From: ko1@a...
Date: Tue, 29 Jan 2008 18:06:06 +0900 (JST)
Subject: [ruby-changes:3827] nobu - Ruby:r15316 (trunk): * encoding.c (encdb_{replicate,alias,dummy,declare}): define only if

nobu	2008-01-29 18:05:50 +0900 (Tue, 29 Jan 2008)

  New Revision: 15316

  Modified files:
    trunk/ChangeLog
    trunk/encoding.c

  Log:
    * encoding.c (encdb_{replicate,alias,dummy,declare}): define only if
      NO_ENCDB_H is not defined.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15316&r2=15315&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=15316&r2=15315&diff_format=u

Index: encoding.c
===================================================================
--- encoding.c	(revision 15315)
+++ encoding.c	(revision 15316)
@@ -34,17 +34,19 @@
 
 void rb_enc_init(void);
 
+#ifndef NO_ENCDB_H
 #undef ENC_REPLICATE
 #undef ENC_ALIAS
 #undef ENC_DUMMY
 static int encdb_replicate(const char *alias, const char *orig);
 static int encdb_alias(const char *alias, const char *orig);
 static int encdb_dummy(const char *name);
-static void enc_declare(const char *name);
+static void encdb_declare(const char *name);
 #define ENC_REPLICATE(name, orig) encdb_replicate(name, orig)
 #define ENC_ALIAS(name, orig) encdb_alias(name, orig)
 #define ENC_DUMMY(name) encdb_dummy(name)
-#define ENC_DEFINE(name) enc_declare(name)
+#define ENC_DEFINE(name) encdb_declare(name)
+#endif
 
 static void
 enc_init_db(void)
@@ -249,8 +251,9 @@
     return index;
 }
 
+#ifndef NO_ENCDB_H
 static void
-enc_declare(const char *name)
+encdb_declare(const char *name)
 {
     int idx = rb_enc_registered(name);
     if (idx < 0) {
@@ -258,6 +261,7 @@
     }
     set_encoding_const(name, rb_enc_from_index(idx));
 }
+#endif
 
 static void
 enc_check_duplication(const char *name)
@@ -289,6 +293,7 @@
     return idx;
 }
 
+#ifndef NO_ENCDB_H
 static int
 enc_replicate(int idx, const char *name, rb_encoding *origenc)
 {
@@ -316,6 +321,7 @@
     }
     return enc_replicate(idx, name, rb_enc_from_index(origidx));
 }
+#endif
 
 int
 rb_define_dummy_encoding(const char *name)
@@ -327,6 +333,7 @@
     return index;
 }
 
+#ifndef NO_ENCDB_H
 static int
 encdb_dummy(const char *name)
 {
@@ -337,6 +344,7 @@
     ENC_SET_DUMMY(enc);
     return index;
 }
+#endif
 
 int
 rb_enc_dummy_p(rb_encoding *enc)
@@ -388,6 +396,7 @@
     return enc_alias(alias, idx);
 }
 
+#ifndef NO_ENCDB_H
 static int
 encdb_alias(const char *alias, const char *orig)
 {
@@ -398,6 +407,7 @@
     }
     return enc_alias(alias, idx);
 }
+#endif
 
 enum {
     ENCINDEX_ASCII,
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15315)
+++ ChangeLog	(revision 15316)
@@ -1,3 +1,8 @@
+Tue Jan 29 18:05:48 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* encoding.c (encdb_{replicate,alias,dummy,declare}): define only if
+	  NO_ENCDB_H is not defined.
+
 Tue Jan 29 17:54:11 2008  NARUSE, Yui  <naruse@r...>
 
 	* enc/gbk.c (EncLen_gbk): too short. [ruby-dev:33497]

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]