Przeglądaj źródła

fix binding build

Jeffrey Morgan 1 rok temu
rodzic
commit
268e362fa7
1 zmienionych plików z 9 dodań i 1 usunięć
  1. 9 1
      llama/binding/binding.h

+ 9 - 1
llama/binding/binding.h

@@ -20,8 +20,12 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 // SOFTWARE.
 
+#ifdef __cplusplus
+
 extern "C" {
 
+#endif
+
 #include <stdbool.h>
 
 extern unsigned char tokenCallback(void *, char *);
@@ -58,4 +62,8 @@ void llama_binding_free_model(void *state);
 
 int llama_predict(void *params_ptr, void *state_pr, char *result, bool debug);
 
-}
+#ifdef __cplusplus
+
+}
+
+#endif