Skip to content

Commit 9725011

Browse files
authored
Merge pull request #33 from mkhazin-r7/mark-fix-c-char-type-bug-and-add-source-dist
Fix: fix c_char type bug and add source dist
2 parents 1899ffd + 826eca1 commit 9725011

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@ jobs:
7373
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=aarch64-unknown-linux-gnu --no-sdist
7474
env:
7575
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
76+
dist-source:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Distribute Source
80+
uses: PyO3/maturin-action@v1
81+
with:
82+
command: sdist
83+
env:
84+
MATURIN_PASSWORD: ${{ secrets.pypi_password }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pydomainextractor"
3-
version = "0.13.9"
3+
version = "0.13.10"
44
authors = ["Viktor Vilskyi <viktor_vilskyi@rapid7.com>"]
55
edition = "2021"
66
repository = "https://github.com/intsights/pydomainextractor"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pydomainextractor"
3-
version = "0.13.9"
3+
version = "0.13.10"
44
authors = [
55
{email = "viktor_vilskyi@rapid7.com"},
66
{name = "Viktor Vilskyi"}
@@ -85,4 +85,4 @@ addopts = [
8585
]
8686
testpaths = [
8787
"tests",
88-
]
88+
]

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use pyo3::exceptions::PyValueError;
33
use pyo3::intern;
44
use pyo3::prelude::*;
55
use pyo3::types::PyString;
6+
use std::os::raw::c_char;
67

78
type DomainString = arraystring::ArrayString<typenum::U255>;
89

@@ -144,7 +145,7 @@ impl DomainExtractor {
144145
] {
145146
if !fraction.is_empty() {
146147
let substr = pyo3::ffi::PyUnicode_FromStringAndSize(
147-
fraction.as_ptr() as *const i8,
148+
fraction.as_ptr() as *const c_char,
148149
fraction.len() as isize,
149150
);
150151

@@ -273,7 +274,7 @@ impl DomainExtractor {
273274
] {
274275
if !fraction.is_empty() {
275276
let substr = pyo3::ffi::PyUnicode_FromStringAndSize(
276-
fraction.as_ptr() as *const i8,
277+
fraction.as_ptr() as *const c_char,
277278
fraction.len() as isize,
278279
);
279280

0 commit comments

Comments
 (0)