Author: nickg
Date: Mon Jan 16 04:24:11 2006
New Revision: 11210

Modified:
   branches/nci/config/gen/config_h/feature_h.in
   branches/nci/src/nci.c
Log:
NCI #10. Have Configure set backend in feature.h, and then actually use the
probed result.


Modified: branches/nci/config/gen/config_h/feature_h.in
==============================================================================
--- branches/nci/config/gen/config_h/feature_h.in       (original)
+++ branches/nci/config/gen/config_h/feature_h.in       Mon Jan 16 04:24:11 2006
@@ -134,5 +134,13 @@ else {
 #define PARROT_INLINE
 EOP
 }
-#endif guard
+
+my $nci_impl = ${nci_impl};
+print OUT <<EOP;
+
+/* from config/inter/nci */
+#define PARROT_NCI_IMPL $nci_impl
+EOP
+
+# endif guard
 print OUT "\n\n#endif\n"

Modified: branches/nci/src/nci.c
==============================================================================
--- branches/nci/src/nci.c      (original)
+++ branches/nci/src/nci.c      Mon Jan 16 04:24:11 2006
@@ -2,8 +2,11 @@
 
 #include "parrot/nci.h"
 
-/* For now, this selects the active backend */
-struct nci_vtable *nci_vtable_ptr = &nci_ffcall_vtable;
+#define PARROT_NCI_CONCAT(x,y,z) x ## y ## z
+#define PARROT_NCI_VTABLE(x) PARROT_NCI_CONCAT(nci_,x,_vtable)
+
+/* Selects the configured NCI backend (configured in feature.h)*/
+struct nci_vtable *nci_vtable_ptr = &PARROT_NCI_VTABLE(PARROT_NCI_IMPL);
 
 INTVAL
 Parrot_get_nci_I(Interp *interpreter, struct call_state *st, int n)

Reply via email to