From owner-freebsd-libh Mon Oct 8 13:38:35 2001 Delivered-To: freebsd-libh@freebsd.org Received: from winston.freebsd.org (adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by hub.freebsd.org (Postfix) with ESMTP id 4A63837B406 for ; Mon, 8 Oct 2001 13:38:33 -0700 (PDT) Received: from localhost (jkh@localhost [127.0.0.1]) by winston.freebsd.org (8.11.6/8.11.6) with ESMTP id f98Kc0H52942; Mon, 8 Oct 2001 13:38:01 -0700 (PDT) (envelope-from jkh@freebsd.org) To: anarcat@anarcat.dyndns.org Cc: freebsd-libh@freebsd.org Subject: Re: basic label editor stub, take II In-Reply-To: <20011008142300.B53336@shall.anarcat.dyndns.org> References: <20011008142300.B53336@shall.anarcat.dyndns.org> X-Mailer: Mew version 1.94.1 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20011008133800B.jkh@freebsd.org> Date: Mon, 08 Oct 2001 13:38:00 -0700 From: Jordan Hubbard X-Dispatcher: imput version 20000228(IM140) Lines: 16 Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Anyways, this interface is getting rather heavy. Isn't there a way to > export tables such as sliceTypeNames[] from C/C++ to TCL? Yep, several ways: 1. Instantiate a sliceTypeNames array variable using TCL's C API and populate it from the C version. On assumes that it's static, so you only need to do it once. 2. Register a sliceTypeNames procedure instead (also from C) which takes an index as an argument and returns the relevent data. This allows the sliceTypeNames variable to have more dynamic contents, and it's comparatively easy to use [sliceTypeNames 1] from TCL in lieu of sliceTypeNames(1). - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message