Skip to content

Commit f5ca02d

Browse files
committed
Update to latest libdatadog
Signed-off-by: Bob Weinand <[email protected]>
1 parent 877ff44 commit f5ca02d

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

Cargo.lock

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components-rs/common.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ typedef struct ddog_Error {
6262
struct ddog_Vec_U8 message;
6363
} ddog_Error;
6464

65-
/**
66-
* Remember, the data inside of each member is potentially coming from FFI,
67-
* so every operation on it is unsafe!
68-
*/
6965
typedef struct ddog_Slice_CChar {
7066
/**
7167
* Must be non-null and suitably aligned for the underlying type.
7268
*/
7369
const char *ptr;
7470
/**
75-
* The number of elements (not bytes) that `.ptr` points to.
71+
* The number of elements (not bytes) that `.ptr` points to. Must be less
72+
* than or equal to [isize::MAX].
7673
*/
7774
uintptr_t len;
7875
} ddog_Slice_CChar;
7976

77+
/**
78+
* Use to represent strings -- should be valid UTF-8.
79+
*/
8080
typedef struct ddog_Slice_CChar ddog_CharSlice;
8181

8282
/**

components-rs/ddtrace.h

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ extern ddog_Uuid ddtrace_runtime_id;
135135

136136
extern void (*ddog_log_callback)(ddog_CharSlice);
137137

138+
extern const uint8_t *DDOG_PHP_FUNCTION;
139+
138140
/**
139141
* # Safety
140142
* Must be called from a single-threaded context, such as MINIT.

components-rs/sidecar.h

-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ void ddog_agent_remote_config_writer_drop(struct ddog_AgentRemoteConfigWriter_Sh
5858

5959
void ddog_sidecar_transport_drop(ddog_SidecarTransport*);
6060

61-
ddog_SidecarTransport *ddog_sidecar_transport_clone(const ddog_SidecarTransport *transport);
62-
6361
/**
6462
* # Safety
6563
* Caller must ensure the process is safe to fork, at the time when this method is called

ext/sidecar.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ static void ddtrace_set_sidecar_globals(void) {
1919
ddtrace_sidecar_instance_id = ddog_sidecar_instanceId_build(session_id, runtime_id);
2020
}
2121

22-
#if _WIN32
23-
extern void *DDOG_PHP_FUNCTION;
24-
#endif
25-
2622
static bool dd_sidecar_connection_init(void) {
2723
if (get_global_DD_TRACE_AGENTLESS() && ZSTR_LEN(get_global_DD_API_KEY())) {
2824
ddtrace_endpoint = ddog_endpoint_from_api_key(dd_zend_string_to_CharSlice(get_global_DD_API_KEY()));
@@ -37,8 +33,8 @@ static bool dd_sidecar_connection_init(void) {
3733
return false;
3834
}
3935

40-
#if _WIN32
41-
DDOG_PHP_FUNCTION = zend_hash_func;
36+
#ifdef _WIN32
37+
DDOG_PHP_FUNCTION = (const uint8_t *)zend_hash_func;
4238
#endif
4339

4440
char logpath[MAXPATHLEN];

0 commit comments

Comments
 (0)