|
From: Kouhei S. <ko...@co...> - 2011-03-10 13:01:40
|
須藤です。
In <AAN...@ma...>
"Re: [ruby-gnome2-devel-ja] 未実装APIの抽出について" on Sat, 5 Mar 2011 09:24:08 +0900,
青柳政聡 <mas...@gm...> wrote:
> 未実装APIを抽出してテンプレートファイルを出力するスクリプトを、ある程度書いたので、
> 試しにテンプレートファイルを元に vte の実装をしたいと考えています。
おぉ!
> そこで、いくつか確認させてください。
>
> * 添付したファイルのようなテンプレートファイルを出力するようにしましたが、
> スタイル等、問題がありますでしょうか?
> vte-pty.c は、クラス自体が新規の場合で、vte-terminal.c は既存クラスにメソッドを追加する場合です。
これは
if(error)
RAISE_GERROR(error);
こうして欲しいです。
if (error)
RAISE_GERROR(error);
後はよさそうな気がします。
> * 以下の enum は Vte::Terminal 配下に定義されるべきな気がしますが、いかがでしょうか?
> * Vte::TerminalAntiAlias
これはdeprecatedみたいですね。
> * Vte::TerminalCursorBlinkMode
> * Vte::TerminalCursorShape
> * Vte::TerminalEraseBinding
Vte::TerminalCursorBlinkMode::SYSTEMとかの他に
Vte::Terminal::CURSOR_BLINK_SYSTEMとかを作るということです
よね?
いいと思います。
> * パッケージによって、ソースファイル名の命名規則が統一されていないので、
> 統一したいと思うのですが、いかがでしょうか?
いいと思います。
私はrb#{パッケージのプレフィックス}-XXX-YYY.cとかがいいです。
なので、Ruby/VTEは↑の規則ですが、Ruby/GTK2は↑の規則に沿っ
ていないことになります。
どういうのがよさそうでしょうか?
> その際、ソースファイルの先頭にファイル名をコメントとして埋め込んでいますが、
> もし必要ないのであれば、消してしまいたいのですが、いかがでしょうか?
いいと思います。
たぶん、ソースの先頭のコメントのフォーマットも決めたいですよ
ね?今は独自のスタイルになっていますが、標準的な方がいいなぁ
と思います。なので、こんなフォーマットはいかがでしょうか?
Copyright表記とライセンス表記のみです。
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/*
* Copyright (C) 20XX-20XX Ruby-GNOME2 Project Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
|