[Namazu-cvs 753] r214 - Search-Namazu/trunk

cvsd @ vaj.namazu.org cvsd @ vaj.namazu.org
2006年 3月 27日 (月) 11:20:32 JST


Author: knok
Date: 2006-03-27 11:20:31 +0900 (Mon, 27 Mar 2006)
New Revision: 214

Modified:
   Search-Namazu/trunk/ChangeLog
   Search-Namazu/trunk/Namazu.xs
Log:
New native function.


Modified: Search-Namazu/trunk/ChangeLog
===================================================================
--- Search-Namazu/trunk/ChangeLog	2006-03-27 02:16:21 UTC (rev 213)
+++ Search-Namazu/trunk/ChangeLog	2006-03-27 02:20:31 UTC (rev 214)
@@ -2,6 +2,8 @@
 
 	* Namazu.xs: Fixed prototype.
 	  Splitted common code from call_search_main.
+	  (call_search_main_ref): New native function to return 
+	  an array as a reference.
 
 2006-03-24  NOKUBI Takatsugu  <knok @ daionet.gr.jp>
 

Modified: Search-Namazu/trunk/Namazu.xs
===================================================================
--- Search-Namazu/trunk/Namazu.xs	2006-03-27 02:16:21 UTC (rev 213)
+++ Search-Namazu/trunk/Namazu.xs	2006-03-27 02:20:31 UTC (rev 214)
@@ -127,6 +127,25 @@
 		}
 		nmz_free_internal();
 
+SV*
+call_search_main_ref(query)
+	SV *query
+
+	CODE:
+		char *qstr;
+		char cqstr[BUFSIZE * 2];
+		AV *retar;
+		int i;
+
+		qstr = SvPV(query, PL_na);
+		nmz_codeconv_query(qstr);
+		strcpy(cqstr, qstr);
+		retar = call_search_main_c(cqstr);
+		nmz_free_internal();
+		RETVAL = newRV_inc((SV*) retar);
+	OUTPUT:
+		RETVAL
+
 int
 nmz_addindex(index)
 	SV *index




Namazu-cvs メーリングリストの案内