Skip to content

Commit

Permalink
Rename c_libcurl.exs to defc_libcurl.exs
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Nov 23, 2023
1 parent 1efa832 commit 4b19adf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions c_libcurl.exs → defc_libcurl.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Mix.install([
{:c, github: "wojtekmach/c"}
{:defc, github: "wojtekmach/defc"}
])

defmodule Curl.MixProject do
Expand All @@ -20,14 +20,14 @@ defmodule Main do
end

defmodule Curl do
use C, compile: "-lcurl"
use DefC, compile: "-lcurl"

# Based on https://curl.se/libcurl/c/simple.html

defc(:test, 0, ~S"""
#include <curl/curl.h>
static ERL_NIF_TERM test(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM test_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
CURL *curl;
CURLcode res;
Expand Down

0 comments on commit 4b19adf

Please sign in to comment.