2009-04-05から1日間の記事一覧
Objective-Cとして書いています。MacOSXにはDeveloperToolsKitにHeaderdoc2htmlというコマンドが梱包されています。これは、Appleが作成したAPIドキュメントを作るためのコマンドで、C系のコメント(/*..*/)から必要な情報を抜き出して、ドキュメントに仕上…
自身がロゼッタで動いているか、どうなのかを調べる低レベルな方法。 static int sysctlbyname_with_pid (const char *name, pid_t pid, void *oldp, size_t *oldlenp, void *newp, size_t newlen) { if (pid == 0) { if (sysctlbyname(name, oldp, oldlenp,…
iPhone Exampleの TheElementsより // we use the singleton approach, one collection for the entire application static PeriodicElements *sharedPeriodicElementsInstance = nil; + (PeriodicElements*)sharedPeriodicElements { @synchronized(self) {…