Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cbindgenにfn.args=verticalを設定し、__declspecの後の空行を消す #518

Merged

Conversation

qryxip
Copy link
Member

@qryxip qryxip commented Jun 11, 2023

内容

/**
* 初期化する
* @param [in] options 初期化オプション
* @return 結果コード #VoicevoxResultCode
*/
#ifdef _WIN32
__declspec(dllimport)
#endif
VoicevoxResultCode voicevox_initialize(struct VoicevoxInitializeOptions options);

この空行を消します。

 /**
  * 初期化する
  * @param [in] options 初期化オプション
  * @return 結果コード #VoicevoxResultCode
  */
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-
 VoicevoxResultCode voicevox_initialize(struct VoicevoxInitializeOptions options);

Rustの最初の実装 (#126)からずっとこうだったようですが、この部分について何か議論した跡も無さそうなので、この空行はない方が視認性が高いかなと思いPRを出しておきます。

関連 Issue

その他

@qryxip
Copy link
Member Author

qryxip commented Jun 11, 2023

?????...この空行無いと駄目なやつ...?
https://github.com/VOICEVOX/voicevox_core/actions/runs/5233633502/jobs/9449234619?pr=518

@@ -206,8 +204,7 @@ VoicevoxResultCode voicevox_initialize(struct VoicevoxInitializeOptions options)
*/
#ifdef _WIN32
__declspec(dllimport)
#endif
const char *voicevox_get_version(void);
Copy link
Member Author

Choose a reason for hiding this comment

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

いやなんじゃこれ...

Copy link
Member Author

Choose a reason for hiding this comment

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

@qryxip
Copy link
Member Author

qryxip commented Jun 11, 2023

調べた結果、この空行は必要そうでした...

@qryxip qryxip closed this Jun 11, 2023
@qryxip
Copy link
Member Author

qryxip commented Jun 11, 2023

いやfn.argsverticalを設定すればいいはず。統一性も高まるはず。

@qryxip qryxip reopened this Jun 11, 2023
@qryxip qryxip changed the title __declspec(dllimport)と関数定義の隙間の空行を消す cbindgenにfn.args=verticalを設定し、__declspecの後の空行を消す Jun 11, 2023
Comment on lines -210 to +208
const char *voicevox_get_version(void);
const char *voicevox_get_version(void);
Copy link
Member Author

@qryxip qryxip Jun 11, 2023

Choose a reason for hiding this comment

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

fn.args=verticalを設定したことで、この妙なスペース一文字も消えました。

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

LGTM!

ヘッダーを生成した後にフォーマットをかける手も良いかもですね。

@Hiroshiba
Copy link
Member

たぶん問題ないと思うのでマージします!
(テストやっぱ長いですね😇)

@Hiroshiba Hiroshiba merged commit e022397 into VOICEVOX:main Jun 11, 2023
Hiroshiba added a commit that referenced this pull request Jun 12, 2023
* Docs: 事例紹介にvoicevoxcore.goを追加 (#498)

Docs: 事例紹介のvoicevoxcore.goを追加

* 間違った`char*`の解放を明示的に拒否する (#500)

* Cargo.tomlをフォーマットする (#504)

* Update rust toolchain 1.70.0 (#506)

Co-authored-by: PickledChair <[email protected]>
Co-authored-by: Ryo Yamashita <[email protected]>

* Rust APIのbuild.rsを抹消する (#508)

* Python APIでは`panic=unwind`にする (#505)

* Python APIでは`panic=unwind`にする

* C APIは`-C panic=abort`でビルドする

* READMEのスペースが足りてなかった (#511)

* windows-latestでなぜかdownload_testが落ちるのを改修 (#517)

* windows-latestでなぜかdownload_testが落ちるのを修正

* a

* cbindgenに`fn.args=vertical`を設定し、`__declspec`の後の空行を消す (#518)

* `__declspec(dllimport)`と関数定義の隙間の空行を消す

* `fn.args="vertical"`を設定

* cbindgenの`include_version`を有効化する (#519)

* cbindgenの`include_version`を有効化する

* jobをリネーム

* 誤字

---------

Co-authored-by: Kota Amasaka <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: PickledChair <[email protected]>
Co-authored-by: Hiroshiba <[email protected]>
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.

2 participants