Skip to content

Use phantom primitive for TLS_method return type - #144

Merged
SeanTAllen merged 1 commit into
mainfrom
fix-tls-method-pointer-type
Aug 2, 2026
Merged

Use phantom primitive for TLS_method return type#144
SeanTAllen merged 1 commit into
mainfrom
fix-tls-method-pointer-type

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

TLS_method returns const SSL_METHOD *, an opaque struct pointer. The FFI declaration used Pointer[None] — the convention for void * or always-null pointers — instead of a phantom primitive. Every other opaque-struct return in the tree (EVP_sha256, BIO_s_mem, EVP_MD_CTX_new) already gets this right.

Adds _SSLMethod and uses it in both the @TLS_method return type and the @SSL_CTX_new parameter.

Closes #131

TLS_method returns const SSL_METHOD *, an opaque struct pointer.
Pointer[None] is for void * or always-null; this is neither.

Closes #131
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Aug 2, 2026
@SeanTAllen
SeanTAllen merged commit e72fd56 into main Aug 2, 2026
15 checks passed
@SeanTAllen
SeanTAllen deleted the fix-tls-method-pointer-type branch August 2, 2026 03:20
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TLS_method is declared with the wrong pointer type

2 participants