Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Update c bindings, add new functions #50

Merged
merged 12 commits into from
Dec 9, 2020

Conversation

DyrellC
Copy link
Contributor

@DyrellC DyrellC commented Nov 9, 2020

Description of change

Updating c bindings to include tagged and signed packets on the subscriber end, as well as a couple utility functions for usability (like converting string link representation to proper streams Address object through bindings).

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

I have run each function through modifications of the main.c file, and confirmed they work when pulled into golang

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • New and existing unit tests pass locally with my changes

Copy link
Contributor

@semenov-vladyslav semenov-vladyslav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update main.c to cover the new functions.

bindings/c/src/api/mod.rs Outdated Show resolved Hide resolved
bindings/c/src/api/mod.rs Outdated Show resolved Hide resolved
bindings/c/src/api/mod.rs Outdated Show resolved Hide resolved
bindings/c/CMakeLists.txt Outdated Show resolved Hide resolved
@DyrellC DyrellC changed the base branch from develop to v1.0.1 December 3, 2020 21:19
Copy link
Contributor

@kwek20 kwek20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@semenov-vladyslav semenov-vladyslav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but move impl of address_from_string into main crate?

use iota::client::bytes_to_trytes;

#[no_mangle]
pub extern "C" fn address_from_string(c_addr: *const c_char) -> *const Address {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice function in general, it's going to be used in other bindings. Maybe move the impl to the main crate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that's a good idea, i'll do that before push

Signed-off-by: DyrellC <dyrell.chapman@iota.org>
@DyrellC DyrellC merged commit 31ed330 into iotaledger:v1.0.1 Dec 9, 2020
@DyrellC DyrellC deleted the update-c-bindings-alvarium branch March 13, 2023 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants