Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

append_transient never returns 1 #15

Open
dkadish opened this issue Jan 15, 2019 · 3 comments
Open

append_transient never returns 1 #15

dkadish opened this issue Jan 15, 2019 · 3 comments

Comments

@dkadish
Copy link

dkadish commented Jan 15, 2019

voc/tract.w

Line 413 in 20a17d6

return 0;

Documentation states that append_transient should return 1 on success, but the function as written will never return 1. I think the last statement (line 413) should return 1. Unless I've missed something?

@PaulBatchelor
Copy link
Owner

Yup, the documentation is correct. The code is wrong. It would seem that the return code is never checked anywhere in the code.

@dkadish
Copy link
Author

dkadish commented Jan 15, 2019

Ahh, got it. I'm working on a Python port of this (I'll post a link once I have something rough working), so I'm going over the code pretty closely. I'll let you know if I see anything else!

@PaulBatchelor
Copy link
Owner

Wow! Good luck. This code is quite a mess, as I was mostly trying to translate the core of Pink Trombone JS to ANSI C. So sorry about that.
It could use a rewrite or two, so I'm happy to see someone trying to tackle a rewrite in another language. Personally, I've been meaning to try to make a version of this (or portions of it) in FAUST. Someday I'll hopefully get to it...

If you make a PR with this fix, I'll be happy to merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants