-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implemented the 'other' literal types: (#91)
Datetime Time Date Size Duration URLs are done not as a separate type, but as a literal modifier that calls CURL's URL validation (loose as it is). Added an option to turn on / off static binding of calls exposed via the FFI. If not set, it's on if glibc is off on linux, and off by default on mac. Also, for simple assignment ONLY, if the assignment is to a variable with an explicitly declared type (and that type is a simple literal), then we will infer the litmod type, picking the first one added associated with the type.w Some issue with the dynamic binding test in meson; just always leave static on for now.
- Loading branch information
Showing
56 changed files
with
3,007 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
#include "con4m.h" | ||
|
||
typedef struct c4m_date_time_t { | ||
struct tm dt; | ||
int64_t fracsec; | ||
unsigned int have_time : 1; | ||
unsigned int have_sec : 1; | ||
unsigned int have_frac_sec : 1; | ||
unsigned int have_month : 1; | ||
unsigned int have_year : 1; | ||
unsigned int have_day : 1; | ||
unsigned int have_offset : 1; | ||
} c4m_date_time_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
#include "con4m.h" | ||
|
||
extern c4m_duration_t *c4m_now(void); | ||
extern c4m_duration_t *c4m_timestamp(void); | ||
extern c4m_duration_t *c4m_process_cpu(void); | ||
extern c4m_duration_t *c4m_thread_cpu(void); | ||
extern c4m_duration_t *c4m_uptime(void); | ||
extern c4m_duration_t *c4m_program_clock(void); | ||
extern void c4m_init_program_timestamp(void); | ||
extern c4m_duration_t *c4m_duration_diff(c4m_duration_t *, | ||
c4m_duration_t *); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
#include "con4m.h" | ||
|
||
// I realize some of this is redundant, but it's just easier. | ||
typedef struct { | ||
char addr[sizeof(struct sockaddr_in6)]; | ||
uint16_t port; | ||
int32_t af; | ||
} c4m_ipaddr_t; | ||
|
||
extern void | ||
c4m_ipaddr_set_address(c4m_ipaddr_t *obj, c4m_str_t *s, uint16_t port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.