Skip to content

Instantly share code, notes, and snippets.

@MarkJr94
Created June 9, 2013 03:59
Show Gist options
  • Save MarkJr94/5737573 to your computer and use it in GitHub Desktop.
Save MarkJr94/5737573 to your computer and use it in GitHub Desktop.
use std::libc::size_t;
static LONG: int = 0;
static OBJECTPOINT: int = 10_000;
static FUNCTIONPOINT: int = 20_000;
static OFF_T: int = 30_000;
macro_rules! CINIT(
($name:ident $typ:ident $val:expr) => (
$name = $typ + $val
)
)
enum CURLopt {
/* This is the FILE * or void * the regular output should be written to. */
File = OBJECTPOINT + 1,
//CINIT(File, OBJECTPOINT, 1i32),
/* The full URL to get/put */
CINIT!(URL, OBJECTPOINT, 2)
}
// Output:
curl.rs:21:7: 21:8 error: expected `}` but found `!`
curl.rs:21 CINIT!(URL, OBJECTPOINT, 2)
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment