Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Add a bunch of arginfo annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMage committed Apr 26, 2021
1 parent 1f8829b commit 05fcc64
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 24 deletions.
9 changes: 6 additions & 3 deletions ext/opencensus_trace_annotation.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@

zend_class_entry* opencensus_trace_annotation_ce = NULL;

ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
ZEND_END_ARG_INFO();

/**
* Fetch the annotation description
*
Expand Down Expand Up @@ -101,9 +104,9 @@ static PHP_METHOD(OpenCensusTraceAnnotation, options) {

/* Declare method entries for the OpenCensus\Trace\Ext\Annotation class */
static zend_function_entry opencensus_trace_annotation_methods[] = {
PHP_ME(OpenCensusTraceAnnotation, description, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceAnnotation, time, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceAnnotation, options, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceAnnotation, description, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceAnnotation, time, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceAnnotation, options, arginfo_void, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
7 changes: 5 additions & 2 deletions ext/opencensus_trace_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_OpenCensusTraceContext_construct, 0, 0, 1)
ZEND_ARG_ARRAY_INFO(0, contextOptions, 0)
ZEND_END_ARG_INFO();

ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
ZEND_END_ARG_INFO();

/**
* Initializer for OpenCensus\Trace\SpanContext
*
Expand Down Expand Up @@ -107,8 +110,8 @@ static PHP_METHOD(OpenCensusTraceContext, traceId) {
/* Declare method entries for the OpenCensus\Trace\SpanContext class */
static zend_function_entry opencensus_trace_context_methods[] = {
PHP_ME(OpenCensusTraceContext, __construct, arginfo_OpenCensusTraceContext_construct, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
PHP_ME(OpenCensusTraceContext, spanId, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceContext, traceId, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceContext, spanId, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceContext, traceId, arginfo_void, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
9 changes: 6 additions & 3 deletions ext/opencensus_trace_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@

zend_class_entry* opencensus_trace_link_ce = NULL;

ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
ZEND_END_ARG_INFO();

/**
* Fetch the link traceId
*
Expand Down Expand Up @@ -101,9 +104,9 @@ static PHP_METHOD(OpenCensusTraceLink, options) {

/* Declare method entries for the OpenCensus\Trace\Ext\Link class */
static zend_function_entry opencensus_trace_link_methods[] = {
PHP_ME(OpenCensusTraceLink, traceId, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceLink, spanId, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceLink, options, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceLink, traceId, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceLink, spanId, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceLink, options, arginfo_void, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
11 changes: 7 additions & 4 deletions ext/opencensus_trace_message_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@

zend_class_entry* opencensus_trace_message_event_ce = NULL;

ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
ZEND_END_ARG_INFO();

/**
* Fetch the message_event type
*
Expand Down Expand Up @@ -124,10 +127,10 @@ static PHP_METHOD(OpenCensusTraceMessageEvent, options) {

/* Declare method entries for the OpenCensus\Trace\Ext\MessageEvent class */
static zend_function_entry opencensus_trace_message_event_methods[] = {
PHP_ME(OpenCensusTraceMessageEvent, type, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, id, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, time, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, options, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, type, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, id, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, time, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceMessageEvent, options, arginfo_void, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
27 changes: 15 additions & 12 deletions ext/opencensus_trace_span.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_OpenCensusTraceSpan_construct, 0, 0, 1)
ZEND_ARG_ARRAY_INFO(0, spanOptions, 0)
ZEND_END_ARG_INFO();

ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
ZEND_END_ARG_INFO();

/**
* Initializer for OpenCensus\Trace\Span
*
Expand Down Expand Up @@ -346,18 +349,18 @@ static PHP_METHOD(OpenCensusTraceSpan, sameProcessAsParentSpan) {
/* Declare method entries for the OpenCensus\Trace\Span class */
static zend_function_entry opencensus_trace_span_methods[] = {
PHP_ME(OpenCensusTraceSpan, __construct, arginfo_OpenCensusTraceSpan_construct, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, __destruct, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, name, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, spanId, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, parentSpanId, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, attributes, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, startTime, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, endTime, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, stackTrace, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, links, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, timeEvents, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, kind, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, sameProcessAsParentSpan, NULL, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, __destruct, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, name, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, spanId, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, parentSpanId, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, attributes, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, startTime, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, endTime, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, stackTrace, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, links, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, timeEvents, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, kind, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(OpenCensusTraceSpan, sameProcessAsParentSpan, arginfo_void, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down

0 comments on commit 05fcc64

Please sign in to comment.