Skip to content

Commit

Permalink
lib: Fix parsing for GList and GList
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlsh committed Mar 6, 2024
1 parent a63d3a4 commit ad0ae9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/lib/src/gir-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,6 @@ export class GirModule {
?.filter(isIntrospectable)
// Avoid attempting to alias non-introspectable symbols.
.map((b) => {
console.debug('b', b)
b.type = b.type
?.filter((t): t is NamedType => !!(t && t.$.name))
.map((t) => {
Expand Down
4 changes: 3 additions & 1 deletion packages/lib/src/gir/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ export function getType(

if (variableType instanceof TypeIdentifier) {
if (variableType.is("GLib", "List") || variableType.is("GLib", "SList")) {
const listType = parameter?.type?.[0].type?.[0]?.$.name;
// TODO: $?.name was not necessary in gi.ts, but TelepathyLogger
// fails to generate now.
const listType = parameter?.type?.[0].type?.[0]?.$?.name;

if (listType) {
name = listType;
Expand Down

0 comments on commit ad0ae9c

Please sign in to comment.